Can we do a reverse fix with a mixed model using lmer

I used the following syntax for a mixed model, and then a step, but that didn't work.

Does this usually work, or am I really unable to use reverse repair with lmer? Thanks!

fullmodel<-lmer(Eeff~NDF+ADF+CP+NEL+DMI+FCM + (1|Study),data=na.omit(phuong)) step(fullmodel, direction = "backward", trace=FALSE ) 
+6
source share
4 answers

You can do this simply by not using the step function. Since your model is simply additive, it does not have to do so much time manually.

+2
source

You can do this with the lmerTest package:

 library(lmerTest) step(fullmodel) 

After testing this function with my rather complex data, it seems to create acceptable alternatives to the model.

+4
source

Here's the direct fix function for lme4 http://www.rensenieuwenhuis.nl/r-sessions-32/

0
source

The function you want is stepAIC from the MASS package.

stepAIC (and step ) use the default AIC, which is asymptotically equivalent to the cross-check "leave one".

As for harsh criticisms, expert knowledge is an excellent starting point for choosing a model, but I too often see it being used as an excuse for transferring responsibility for making complex statistical decisions to an applied researcher who does not understand statistics.

Edit: sorry my bad, wrong question, I thought you said "lme" instead of "lmer". I don't know if stepAIC supports lmer.

-1
source

Source: https://habr.com/ru/post/921921/


All Articles