I have run the model:

model2 <- lmer(tas ~ station + (1 | date), data = all5)

where station is a categorical variable with 4 levels. I want to check for variance homogeneity. I find the residuals from lmerresid <- resid(model2). If I run the levene test: leveneTest(lmerresid ~ all5$station) I get p = 0.6572 so it implies homogeneity of variances. If I make the boxplots it implies homogeneity of variances:

boxplot(lmerresid ~ all5$station)

enter image description here But if I plot residuals vs fited then there is sth wrong: #Plot vs factors

par(mfrow = c(1,1))
plot(lmerresid ~ fitted(model2))

enter image description here

Are the variances homogeneous?

  • $\begingroup$ Your question is missing the word "enough". I would say your model is probably missing predictors but it might be good enough. You could derive robust standard errors to be on the safe side. $\endgroup$
    – Roland
    Mar 16 at 8:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.