[R-sig-ME] inference for random effects

Ben Bolker bolker at ufl.edu
Thu Feb 5 20:44:04 CET 2009

Juan Pedro Steibel wrote:
> Jeff,
> Why not use the model without the random effect as the null model?
> JP

  Because the model without the random effect can't be fitted by lmer
(and there is no equivalent of nlme::gls in the lme4 package, which
handles the same syntax but without random effects), and as it turns
out glm calculates the likelihood differently so that they are not
comparable, so that

glm(cbind(successes, total-successes) ~ A * B  data=dat,

 would not give an appropriate comparison.

  Jeff's approach is clever, if I (or someone else) gets a
chance it would be nice to compare it against the approach
discussed in http://glmm.wikidot.com/reef-fish , which uses
a modification of some of the code in one of the lme4 vignettes
to compute a likelihood profile for the random effects variance
(including at V=0, which is the likelihood we're interested in

  Ben Bolker

> Jeff Evans wrote:
>> I'm sure this must have been discussed before, but in searching the archives
>> I haven't found an answer yet. 
>> Simple question:
>> In lme4 can I evaluate the significance of a random effect in a model by
>> substituting an uninformative dummy variable for it and comparing it to the
>> model with the "real" random effect using anova? 
>> M1 = lmer(cbind(successes, total-successes) ~ A * B + (1|C), data=dat,
>> family="binomial")
>> M2 = lmer(cbind(successes, total-successes) ~ A * B + (1|Cdummy) , data=dat,
>> family="binomial")
>> anova(M1,M2)
>> Where A, B, and C are factors, and Cdummy is a column with the word "dummy"
>> in every row.
>> Then compare the AIC, subtracting 2 from the M2 AIC score since it "falsely"
>> estimated a parameter for the random effect. When I do this, I get delta AIC
>> of about 600 favoring the more informative M1. Is this approach
>> fundamentally wrong? 
>> Thanks,
>> Jeff Evans
>> Michigan State University
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc

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