Please, is there an algorithm or a package to identify and compare the random variables of a mixed polynomial model of degree n through AIC or AICc in R?
Example: Third degree
lmer(y ~x + x2 + x3 + (1|id), data, REML=T)
lmer(y ~x + x2 + x3 + (1|id) + (0+x|id), data, REML=T)
lmer(y ~x + x2 + x3 + (1+x|id), data, REML=T)
lmer(y ~x + x2 + x3 + (1|id) + (0+x|id) + (0+x2|id), data, REML=T)
lmer(y ~x + x2 + x3 + (1+x+x2+x3|id), data, REML=T)
I have tried the dredge function from the MuMIn package but it compares instead fixed effects like:
lmer(y ~x + (1|id), data, REML=F)
lmer(y ~x + x2 + (1|id), data, REML=F)
lmer(y ~x + x2 + x3 + (1|id), data, REML=F)
Thank you so much
Aucun commentaire:
Enregistrer un commentaire