I am currently running some analyses on a linguistic data set with a mixed effect model. The problem is, I think that one random factor should be excluded while my colleague thinks it should be included. The two options are:
lmer(intdiff ~ stress * vowel_group + (1|speaker) + (1|word), data)
lmer(intdiff ~ stress * vowel_group + (1|speaker), data)
How do we check which model best fits our data set? It was suggested that I use a likelihood ratio test, but as far as I can tell, there isn't a function in R that can be applied to 2 linear mixed effects models. Is there another way to tell which model is more predictive?
Thanks
fit1and your second model infit0then typeanova(fit0,fit1)but you need to fit with theMLmethod, notREML– Stéphane Laurent Feb 12 '13 at 22:33anova(fit0,fit1):) – Stéphane Laurent Feb 13 '13 at 08:45