Include the IQ variable (which has been centered (though before students with missing values were removed)) in the model. ```{r echo = TRUE} model1 = lmer(langPOST ~ 1 + IQ_verb + (1|schoolnr), data = neth, REML=F) summary(model1) confint(model1) ``` (g) How many/Which parameters are estimated by this model?

(h) Provide interpretations of the estimated slope and intercept.

(i) What is the estimated variation in responses for a particular value of IQ_verb? (j) Which has changed more, the estimated within-group variation or the estimated between-group variation? Does this make sense in context? Is it possible for both of them to decrease? What does that mean? (k) What is the new value of the ICC? How do you interpret this? What would it mean for this value to be super close to zero? ```{r} performance::icc(model1) ``` (l) What would a graph of this model look like? What if we had treated the schools as fixed effects? (m) Is the (conditional) effect of verbal IQ statistically significant? How are you deciding? (n) What if we had ignored the grouping by class? ```{r} summary(lmmodel <- lm(neth$langPOST~neth$IQ_verb)) ``` A neat graph showing the fitted lines: ```{r message=FALSE} preds = predict(model1, newdata = neth) ggplot(neth, aes(x = IQ_verb , y = preds , group = schoolnr, color = schoolnr )) + geom_smooth(method = "lm", alpha = .5, se = FALSE) + geom_jitter(data = neth, aes(y = langPOST), alpha = .1) + theme_bw() #fixed effects model1F = lm(langPOST ~ 1 + IQ_verb + factor(schoolnr), data = neth) predsF = predict(model1F, newdata = neth) ggplot(neth, aes(x = IQ_verb , y = predsF , group = schoolnr, color = schoolnr )) + geom_smooth(method = "lm", alpha = .5, se = FALSE) + geom_jitter(data = neth, aes(y = langPOST), alpha = .1) + theme_bw() ``` **Notes** - It's probably a good idea to grand mean center all explanatory variables before you start your analysis. ? - The adjusted intraclass correlation coefficient is often smaller than the "raw" (null model) intraclass correlation coefficient. - Performance package: The adjusted ICC is what we would calculate "by hand" which just uses the variance components after adding the covariate into the model. The unadjusted ICC takes "fixed effect" variance into account (in the denominator) as well (see insight::get_variance(model)) (the change in unexplained variation when the fixed effect is added to the model). We will focus more on the adjusted ICC, if that. Of real interest to us is the unadjusted ICC from the null model, but you can look at the ICC in other models to see how that has impacted the "unexplained" group to group variation. Reference: Nakagawa S, Johnson P, Schielzeth H (2017) The coefficient of determination R2 and intra-class correlation coefficient from generalized linear mixed-effects models revisted and expanded. J. R. Soc. Interface 14. doi: 10.1098/rsif.2017.0213 _To think about_: - Are these nested models? What would the likelihood ratio test tell us?