I set up a multilevel model in R with the lme4-package to test different effects on social participation in primary school classes. Now I assume that the effects of academic performance (sp) and emotional-social competence (es) vary between classes, which is why I set up a model with random effects. Now I want to test those random slopes. This is my model (don't wonder, In my model, other variables - such as gender, migration background and the teacher's attitude - are included):
mod3 <- lmer(
social_t1 ~ 1 + sex + mig + sl.c + es.c + attitude + (1 + sl.c + es.c|class),
data = kommschreib_ak,
na.action = na.exclude
)
summary(mod3)
The problem is that R only outputs the variances and not the p-value, which I want to have.
I have already found out how I can test the two slopes individually in a model (via anova-test), but not together in one. So I want to have a significance test that gives me a p-value for both academic performance and emotional-social competence for my model, which contains both random slopes.
Is there any chance I can do it in R?
My colleague has done this in MPlus so far. And since we assume that the random effects influence each other, we get different results when I test the effects individually.