I have run the model:
model2 <- lmer(tas ~ station + (1 | date), data = all5)
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)
But if I plot residuals vs fited then there is sth wrong: #Plot vs factors
par(mfrow = c(1,1)) plot(lmerresid ~ fitted(model2))
Are the variances homogeneous?