I have a non-parametric (by which I mean non-normal) data distribution. I tried several transformations, but none were helpful. Now, I want to find a model where I can include random effects with the non-normally distributed data. I know the Kruskal-Wallis test, but I couldn't find any hints if I can include random effects. Does anyone know of an appropriate model?
I do have four different groups with a total N of 328. The dependent variable ranges from 1 to 9. I performed a Shapiro-Wilks tests with this dependent variable for the four groups and all tests were highly significant. I have done some model validation using lme model including the four different groups as a fixed effect and another factor as random effect. The Q-Q plot of this model shows a big bulge at the beginning therefore I assumed that I cannot use the model. The other plots look somehow fine. Please, let me know what else I have to state as I am not really familiar with blogs!
Histograms of the log-transformed dependent variable sorted by the four groups that I want to use as a fixed effect for my model:
This is the model validation of the model I applied.I have used a Linear Mixed-Effects Model with the Groups as fixed effects and an additional random effect.
And here is the code I applied
SGroup1 <- lme(Schoollog~Group1, data=T4, random=~1|ID, method='ML')
par(mfrow=c(2,2))
plot(fitted(SGroup1),resid(SGroup1))
abline(h=0, lty=2)
qqnorm(resid(SGroup1))
qqline(resid(SGroup1))
scatter.smooth(fitted(SGroup1), sqrt(abs(resid(SGroup1)))
qqnorm(unlist(ranef(SGroup1)))
qqline(unlist(ranef(SGroup1)))