Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could we do backward elimination with mixed model using lmer

Tags:

r

I used the following syntax for the mixed model and then step but it did not work.

Does it normally work like this or I actually can not use backward elimination with lmer? Thanks!

fullmodel<-lmer(Eeff~NDF+ADF+CP+NEL+DMI+FCM + (1|Study),data=na.omit(phuong))
step(fullmodel, direction = "backward", trace=FALSE ) 
like image 843
hn.phuong Avatar asked Aug 02 '12 08:08

hn.phuong


2 Answers

You can do this with lmerTest package:

library(lmerTest)
step(fullmodel)

After testing this function with my rather complex data, it does seem to produce feasible model alternatives.

like image 61
Mikko Avatar answered Sep 17 '22 03:09

Mikko


You could do it, just not with the step function. Since your model is just additive it shouldn't take that long to do by hand.

like image 32
John Avatar answered Sep 18 '22 03:09

John