[R-sig-ME] Log-likelihood and mixed models in glmer

Andrew Miles rstuff.miles at gmail.com
Tue Jan 17 00:37:14 CET 2012


Here's the data.  In answer to your questions:

1. Yes, I meant adding predictors should "never" make the model fit the data worse.
2. The variable networth2.gmc is grand-mean centered - actually, I divided the original variable by 100,000 and then centered it to reduce the variable range and make estimation (and interpretation) easier.  Married  is dichotomous, depscore ranges from 0-8, and selfhealth from 0-5.  I did not center the last two since their range is already quite limited.
3. I tried the logLik function, and it returns the same values as anova().

I'm not sure about the convergence problems.  Based on some of the comments I've read about lmer, a convergence problem doesn't mean the estimates aren't reasonable, they only mean the fitting function stalled out without meeting its internal criteria for what an optimal fit looks like (i.e., a clear maximum).  Hence I looked at the parameters estimated at each step, they look to be converging to a set of reasonable parameters, and so I assume the models are reliable.  But if I'm wrong, I'd love to know it, and to know why.

Thanks in advance for all your help!

Andrew Miles


On Jan 16, 2012, at 12:09 PM, Ben Bolker wrote:

> Andrew Miles <rstuff.miles at ...> writes:
> 
>> Can someone point me to a reference that will explain why, when
>> using mixed models (glmer and lmer) adding explanatory variables
>> decreases the log likelihood?  This makes no sense to me, as adding
>> explanatory power should make the model fit the data worse.  I've
>                        ^^^^^
>                        never?
> 
>> attached the data I am using, which contains no missing values, and
>> here are the models I am running, and the results:
> 
>  The attachment didn't make it through to the mailing list.
> Could you post it somewhere (or send it to me)?
> 
>> #note, models do not fully converge, but examination of estimates
>>  using verbose=T suggests they are resonable
> 
>    The fact that they didn't converge (combined with your observation)
> seems like a giant warning message to me ...  hard to say more without
> seeing the data (see above)
> 
>> mod.null = glmer(res.lifesat.last5 ~ 1 + (1|hhidpn) + 
>> (1|hhid), data=data.nomiss, family=binomial(link="probit"))
>> mod1 = glmer(res.lifesat.last5 ~ networth2.gmc + (1|hhidpn) + 
>> (1|hhid), data=data.nomiss, family=binomial(link="probit"))
>> mod2 = glmer(res.lifesat.last5 ~ networth2.gmc + married + (1|hhidpn) +
>> (1|hhid), data=data.nomiss, family=binomial(link="probit"))
>> mod3 = glmer(res.lifesat.last5 ~ networth2.gmc + married + depscore + 
>> selfhealth + (1|hhidpn) +
>> (1|hhid), data=data.nomiss, family=binomial(link="probit"))
> 
>  I have to add some text so the Gmane portal will be happy,
> so let me just add that
> 
>  mod1 <- update(mod.null, . ~ . + networth2.gmc)
>  mod2 <- update(mod1, . ~ . + married)
>  mod3 <- update(mod2, . ~ . + depscore + selfhealth)
> 
>  would be a little bit clearer.
> 
>  Have you tried centering any continuous predictors?
> 
>> #note that mod2 and mod3 have lower log-likelihoods than mod1, 
>> and mod3 has a lower LL than the null model
>> anova(mod.null, mod1, mod2, mod3)
> 
>   Do you get the same results from just using logLik() ?  Perhaps
> anova() is scrambling things up?
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models




More information about the R-sig-mixed-models mailing list