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 )
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With