glmmadmb出错(.....)函数maximizer失败(找不到STD文件)

时间:2012-06-23 17:37:03

标签: r

这很好用:

fit.mc1 <-MCMCglmm(bull~1,random=~school,data=dt1,family="categorical",
prior=list(R=list(V=1, fix=1), G=list(G1=list(V=1, nu=0))), slice=T)

这样做:

fit.glmer <- glmer(bull~(1|school),data=dt1,family=binomial)

但是现在我正在尝试使用包glmmadmb,但这不起作用:

fit.mc12 <- glmmadmb(bull~1+(1|school), data=dt1, family="binomial", 
mcmc=TRUE, mcmc.opts=mcmcControl(mcmc=50000))

它会生成错误:

Error in glmmadmb(bull~ 1 + (1 | school), data = dt1, family = "binomial", : 
The function maximizer failed (couldn't find STD file)
In addition: Warning message:
running command '<snip>\cmd.exe <snip>\glmmadmb.exe" -maxfn 500 -maxph 5 
-noinit -shess -mcmc 5000 -mcsave 5 -mcmult 1' had status 1 

1 个答案:

答案 0 :(得分:0)

嗯。任何可重复的例子的可能性......?

以下简单模拟案例似乎有效(尽管glmmADMB mcmc 慢于MCMCglmm - 它实际上尚未完成我,虽然似乎没有抱怨但仍然在忙碌着。)

对于这种简单的情况,我怀疑glmmADMBMCMCglmm支配,尽管如果你正在处理反贝叶斯裁判,它可能会有用......

nschool <- 20
nrep <- 20
dt1 <- expand.grid(school=LETTERS[1:nschool],rep=seq(nrep))
set.seed(101)
u.school <- rnorm(nrep)
dt1$eta <- u.school[dt1$school]
dt1$bull <- rbinom(nrow(dt1),size=1,prob=plogis(dt1$eta))

library(MCMCglmm)
fit.mc1 <-MCMCglmm(bull~1,random=~school,data=dt1,family="categorical",
                   prior=list(R=list(V=1, fix=1), G=list(G1=list(V=1, nu=0))),
                   slice=TRUE)

library(lme4)
fit.glmer <- glmer(bull~(1|school),data=dt1,family=binomial)

library(glmmADMB)
fit.mc12 <- glmmadmb(bull~1+(1|school), data=dt1, family="binomial", 
                     mcmc=TRUE, mcmc.opts=mcmcControl(mcmc=50000))