TransWikia.com

p-value random effect in glmer() in lme4 package

Cross Validated Asked by ribelles on December 25, 2021

I know that in order to test whether a random effect has a significant impact on a model it’s necessary to sequentially remove one random effect at a time and check each model pair with anova() function in lme4 package or through exactLRT() function included in RLRsim package.

However this functions works me well when I worked with lmer() function but not in glmer() function.

In detail, I want to discover if the inclusion of a random effect in my model is significant or not.

model0<-glm(Feed_kg_DM_day~Week, data=dietdef2, family=gaussian(link=log))
model1<-glmer(Feed_kg_DM_day~Week+(1|rat), data=dietdef2, family=gaussian(link=log))

If I perform anova(model0, model1) doesn’t show me the p-value:

Analysis of Deviance Table

Model: gaussian, link: log

Response: Feed_kg_DM_day

Terms added sequentially (first to last)


    Df Deviance Resid. Df Resid. Dev
NULL                  2756     1119.1
Week 14   1.5985      2742     1117.5

How can I know that the effect of random variable is significant?

Thanks a lot,

One Answer

In an experiment with repeated measurements, or an observational study involving clustering, the non-independence of observations within clusters, subjects, participants, is often very well handled by specifying random intercepts for the grouping variable in question.

Unless the estimated variance is very small, the random intercepts should be retained.

Furthermore, testing for significance of the random effects is hindered because we would be trying to formulate a test where, under the null hypothesis, the parameter would be on the boundary of the parameter space (zero), and in any case, removing a patameter from a model in the basis of non-significance is a very questionable thing to do.

Answered by Robert Long on December 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP