I am trying to evaluate fixed effects by model comparison using lme4. Every time I add fixed effect, I also add corresponding random intercept and slope. When I compare a model with fixed effects (m1) vs. null model (m0), I see improvement in the model fit. However, it seems that the improvement is achieved only by random slopes, i.e. if I leave only random intercept in my model (m1a), there is no significant difference between m1a and m0.
m0 <- lmer(dv ~ 1 + (1|id), data = df, REML=F) m1 <- lmer(dv ~ 1 + A + (1+A|id), data = df, REML=F) m1a <- lmer(dv ~ 1 + A + (1|id), data = df, REML=F) anova(m0, m1) # p < 0.05 anova(m0, m1a) # p > 0.05
My question is how should I interpret these results? The effect of A is not significant, however, the variation in this effect between participants seems to explain some variance.