[R-sig-ME] Likelihood drops on adding random effect

Douglas Bates bates at stat.wisc.edu
Thu May 17 05:58:16 CEST 2012


On Wed, May 16, 2012 at 9:48 PM, Murray Jorgensen <maj at waikato.ac.nz> wrote:
> *Thanks for that, David.
>
>> boxx <- box
>> f0128bi = lmer(fincr ~ icfac + (1|gap) + (1|boxx)+ (1|gap:boxx), family =
> binomial)
>> f0128biu = update(f0128bi, . ~ . + (1|tree))
>> anova(f0128bi,f0128biu)
> Data:
> Models:
> f0128bi: fincr ~ icfac + (1 | gap) + (1 | boxx) + (1 | gap:boxx)
> f0128biu: fincr ~ icfac + (1 | gap) + (1 | boxx) + (1 | gap:boxx) + (1 |
> f0128biu:     tree)
>         Df    AIC    BIC  logLik Chisq Chi Df Pr(>Chisq)
> f0128bi   7 615.73 655.48 -300.87
> f0128biu  8 687.01 732.43 -335.51     0      1          1
>
> So update() does not help. I guess I will need to fool with starting values.

update() can't help in this context.  All update does is take the call
from the previous fit, modify it according to the other arguments to
update, then evaluate the modified call.

Notice that your first model fit has a zero estimate for the 1080
random effects associated with the gap:box interaction, so the model
reduces to

 fincr ~ icfac + (1 | gap) + (1 | box) + (1 | tree)

Models with a random effect for gap:box have over 1080 random effects
for 2160 binary observations.

As with all such cases, I would start with setting verbose=2 or
something like that to see where the iterations are headed.  The model
is probably converging to a local optimum on the boundary.

> On 17 May 2012 14:34, David Duffy <David.Duffy at qimr.edu.au> wrote:
>
>> On Thu, 17 May 2012, Murray Jorgensen wrote:
>>
>>  *I tried using 'update' which should (I believe) initialise at the simpler
>>>
>>> model:
>>>
>>>  f0128biu = update(f0128bi, . ~ . + (1|tree))
>>>>
>>> Error in model.frame.default(formula = fincr ~ icfac + (1 + gap) + (1 +  :
>>>  invalid type (closure) for variable 'box'
>>>
>>
>> It's finding the box() function.
>>
>> --
>> | David Duffy (MBBS PhD)                                         ,-_|\
>> | email: davidD at qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
>> | Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
>> | 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v
>>
>
>
>
> --
> Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
> Department of Statistics, University of Waikato, Hamilton, New Zealand
> Email: maj at waikato.ac.nz    majorgensen at ihug.co.nz      Fax 7 838 4155
> Phone  +64 7 838 4773 wk    Home +64 7 825 0441   Mobile 021 0200 8350
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> 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