[ADMB Users] Warning message: Convergence failed:log-likelihood of gradient=...

418 views
Skip to first unread message

W Robert Long

unread,
Jan 11, 2013, 4:02:30 PM1/11/13
to us...@admb-project.org
Hi all

I am using glmmADMB to fit a zero-inflated negative binomial model with
random slopes and random intercepts. The model formula is

zi1 <- glmmadmb(Y ~ time*X1 + time*X2 +
(time | Subject), data=final, family="nbinom2", zeroInflation=TRUE)

There are 4 time points and 85 subjects.

The outcome has some missing values, approx 20% are missing. The model
runs fine with complete case data.

I had originally wanted to do multiple imputation, but I have yet to
find a way of multiply imputing zero-inflated data in the context of
this kind of multilevel/hierarchical model. So, I have implemented a
random hot-deck imputation, which /appears/ to have worked well,
however, around 50% of the completed datasets return this warning from
glmmADMB:

Convergence failed:log-likelihood of gradient= -XX.XXX

and the parameter estimates are not as expected. Also, occasionally
(5-10% of the time) it returns the error:

The function maximizer failed (couldn't find STD file)

The remaining imputed datasets don't cause any problem and the parameter
estimates are within the ranges expected.

All the imputed values are plausible, as you would expect from a
hot-deck imputation and so far I can't identify what is causing these
warnings and errors.

I would be grateful for any hints or advice about how to proceed.

Thanks
Robert Long
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users

Ben Bolker

unread,
Jan 11, 2013, 4:16:13 PM1/11/13
to us...@admb-project.org
Nothing obvious springs to mind, but a couple of hints about next steps:

* examine the imputed data sets for the cases that failed and see if
you can see any obvious differences -- for example, do you get
individuals with extreme values? If you plot those data sets, does
something jump out at you?
* does simplifying the model in various directions (e.g. zero-inflated
Poisson, or non-zero-inflated NB, or an intercept-only random effect)
help? (I'm not saying there's anything wrong with your model, just that
you might be able to isolate the part of the model that is causing trouble.)
* If you need to communicate with the real gurus on this list, they
will want an example in pure ADMB. You can get this by setting the
'save.dir' parameter when running glmmADMB -- then sending or posting
your DAT, PIN, and TPL files should allow ADMB users to run them without
touching R.

Ben Bolker

W Robert Long

unread,
Jan 11, 2013, 5:13:32 PM1/11/13
to us...@admb-project.org
Hi Ben

Thanks a lot :)

I have narrowed the problem down a little, by changing the hot-deck imputation scheme so that it insists on matching on observations with the same "time" value, which doesn't seem an unreasonable constraint. This has resulted in a reduction to around 25% (so half as compared to before the change) of these warnings.  With random intercepts only I am getting the error "The function maximizer failed (couldn't find STD file)" much more often. (around 50% of the time) and so far, no warnings "Convergence failed:"

I know your name from several other lists and forums, and I wonder if I might take the liberty of asking whether you know another package capable of fitting these kind of zero-inflated  glmms, just for the purpose of testing/comparison - I think MCMCglmm might be able to do it, and I am already working on a BUGS implementation, but I don't know any others.. ?

Thanks again
WRL

W Robert Long

unread,
Jan 15, 2013, 4:29:43 PM1/15/13
to us...@admb-project.org
Hi all

I'm not sure if this is a problem with glmmabmb or the coda package, or (most likely) my code. I ran this model:

fit1.mcmc <- glmmadmb(Y ~ time*X1 + time*X2 + ( 1| Subject), data=final, family="nbinom2", zeroInflation=TRUE,
        mcmc=TRUE,mcmc.opts=mcmcControl(mcmc=10000))

and summary(zi1.mcmc) gave me the estimates I was expecting, that is:

                         Estimate Std. Error z value Pr(>|z|)   
(Intercept)               .......
time                     ......
X1                    ......
X2                    ......
time:X1                    ......
time:X2                     ......

However, when running head(HPDinterval(as.mcmc(fit1.mcmc$mcmc))) I got

                              lower      upper
pz                       ...........       ...........
(Intercept)           ...........       ...........
time                      ...........       ...........
X1                     ...........       ...........
X2                     ...........       ...........
time:X1         ...........       ...........

The interval for time:X2 is absent.

Am I missing something  (excuse the pun) ?

Thanks
WRL





W Robert Long

unread,
Jan 16, 2013, 3:04:46 AM1/16/13
to us...@admb-project.org
Haha. I knew that. How silly. Thanks a lot !!

On 16/01/2013 02:59, Torbjørn Ergon wrote:
> The head function gives you the top rows of whatever you put inside...
>
> Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages