December 1, 2023
Print list of packages and cite them via Pandoc citation.
Recall, we use the HSB dataset from the merTools
package (Knowles & Frederick, 2024). For a more detailed description see :
schid minority female ses mathach size schtype meanses
1 1224 0 1 -1.528 5.876 842 0 -0.428
2 1224 0 1 -0.588 19.708 842 0 -0.428
3 1224 0 0 -0.528 20.349 842 0 -0.428
4 1224 0 0 -0.668 8.781 842 0 -0.428
5 1224 0 0 -0.158 17.898 842 0 -0.428
6 1224 0 0 0.022 4.583 842 0 -0.428
The one-Way ANOVA with Random Effects Model is a model without predictors (often called the empty model [ger: “Nullmodell”]); the variance of a variable is decomposed into level 1 (within-) and level 2 (between-) variance components and it is the first step in (every?) multilevel analysis.
Level-specific equations
\[ \text{Level 1: } Y_{ij} = \beta_{0j} + r_{ij} \qquad(1)\]
\[ \text{Level 2: } \beta_{0j} = \gamma_{00} + u_{0j} \qquad(2)\]
Combined equation
Substituting Equation 2 into Equation 1 yields the combined model equation (see Equation 3):
\[ Y_{ij} = \gamma_{00} + u_{0j} + r_{ij} \qquad(3)\]
Variance decomposition of \(Y_{ij}\)
\[ \begin{aligned} VAR(Y_{ij}) &= VAR(u_{0j}) + VAR(r_{ij}) \\ &= \tau_{00} + \sigma^2 \end{aligned} \qquad(4)\]
Intraclass correlation coefficient (ICC):
\[ ICC(\rho) = \frac{ \tau_{00} } {\tau_{00} + \sigma^2 } \qquad(5)\]
→ It measures the proportion of the variance in the outcome that is between level 2 units; if \(ICC = 0\) there is no need for multilevel modeling!
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: mathach ~ 1 + (1 | schid)
Data: dat
AIC BIC logLik deviance df.resid
47121.8 47142.4 -23557.9 47115.8 7182
Scaled residuals:
Min 1Q Median 3Q Max
-3.06262 -0.75365 0.02676 0.76070 2.74184
Random effects:
Groups Name Variance Std.Dev.
schid (Intercept) 8.553 2.925
Residual 39.148 6.257
Number of obs: 7185, groups: schid, 160
Fixed effects:
Estimate Std. Error t value
(Intercept) 12.6371 0.2436 51.87
group |
Estimate |
Standard Error |
statistic |
||
---|---|---|---|---|---|
Fixed effects | |||||
(Intercept) |
12.637 |
0.244 |
51.873 |
||
Random effects | |||||
schid |
sd__(Intercept) |
2.925 |
|||
Residual |
sd__Observation |
6.257 |
|||
Signif. codes: 0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05 | |||||
square root of the estimated residual variance: 6.3 | |||||
data's log-likelihood under the model: -23,557.9 | |||||
Akaike Information Criterion: 47,121.8 | |||||
Bayesian Information Criterion: 47,142.4 |
Recall the combined equation of the model (Equation 3): \(Y_{ij} = \gamma_{00} + u_{0j} + r_{ij}\)
Fixed effects:
\(\gamma_{00}\) = 12.637
Random effects:
\(VAR(u_{0j}) = \tau_{00}\) = 8.553
\(VAR(r_{ij}) = \sigma^2\) = 39.148
[Back to website]