Steven Vannoy
10/5/16
When observations are clustered we may have predictor variables at different levels
Multi Level Models (also heirachical linear models, mixed-effects models)
| Group | Motivation | Pounds |
|---|---|---|
| 1 | 4 | 15 |
| 1 | 4 | 17 |
| 1 | 4 | 15 |
| 1 | 4 | 17 |
| Group | Size | Avg. Wt. Loss | Avg. Motivation |
|---|---|---|---|
| 40 | 13 | 15.77 | 3.62 |
| 1 | 10 | 16.40 | 4.20 |
| 2 | 9 | 18.22 | 4.00 |
| 3 | 10 | 14.00 | 3.50 |
aovLm <- aov(pounds~GR, data=c14e01Df)
| Df | Sum Sq | Mean Sq | F value | Pr(>F) | |
|---|---|---|---|---|---|
| GR | 39.00 | 2341.00 | 60.03 | 3.75 | 0.00 |
| Residuals | 346.00 | 5544.00 | 16.02 |
\[
{ICC} = \frac{{MS}_{tx} - {MS}_{er}}{{MS}_{tx} + (\tilde{n}-1){MS}_{er}}
\]
\[ {ICC} = \frac{60.03 - 16.02}{60.03 + (9.63*16.02)}=0.22 \]
The typical regression with one predictor
Table 14.2.1.A
| Pounds | ||||||||
| B | CI | std. Error | std. Beta | CI | std. Error | p | ||
| (Intercept) | 15.00 | 14.70 – 15.31 | 0.16 | <.001 | ||||
| Motivation | 3.27 | 2.97 – 3.57 | 0.15 | 0.74 | 0.67 – 0.81 | 0.03 | <.001 | |
| Observations | 386 | |||||||
| R2 / adj. R2 | .545 / .544 | |||||||
Table 14.2.1.B
| Pounds | ||||||||
| B | CI | std. Error | std. Beta | CI | std. Error | p | ||
| (Intercept) | 0.72 | -4.14 – 5.58 | 2.40 | .765 | ||||
| Motivation | 4.16 | 2.77 – 5.55 | 0.69 | 0.70 | 0.47 – 0.93 | 0.12 | <.001 | |
| Observations | 40 | |||||||
| R2 / adj. R2 | .492 / .479 | |||||||
Table 14.2.1.C
| Estimate | Standardized | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|---|
| (Intercept) | 15.26 | 0.00 | 0.72 | 21.14 | 0.00 |
| motivateC | 3.12 | 0.70 | 0.14 | 21.76 | 0.00 |
| GR1 | -1.19 | -0.04 | 1.10 | -1.09 | 0.28 |
| GR2 | 1.25 | 0.04 | 1.13 | 1.11 | 0.27 |
| GR38 | 2.44 | 0.07 | 1.28 | 1.90 | 0.06 |
| GR39 | -2.93 | -0.09 | 1.18 | -2.49 | 0.01 |
Just using group membership
\( \underline{Y_{i}} = \beta_{1}^*X_{1}+\beta_{0}^*+\underline{\epsilon_{i}} \)
Random Variables are selected at random from a probability distribution
Fixed Variables are assumed to take on fixed values
A. Coefficients in micro-level equationfor group j
B. Fixed population regression coefficients: the fixed part of the model
C. Residuals and variance components: the random part of the model
| term | estimate | std.error | statistic | group |
|---|---|---|---|---|
| Intercept | 15.115437 | 0.4090312 | 36.95424 | fixed |
| sd(GR) | 2.215050 | NA | NA | GR |
| sd(Residual) | 4.008669 | NA | NA | Residual |
# Calcualte the ICC from the HLM
(lmeICC <- tidyLmerMod$estimate[2]^2/sum(tidyLmerMod$estimate[2:3]^2))
[1] 0.233909
| Pounds Lost | ||||
| B | std. Error | p | ||
| Fixed Parts | ||||
| (Intercept) | 15.14 | 0.28 | <.001 | |
| motivation | 3.12 | 0.21 | <.001 | |
| Random Parts | ||||
| σ2 | 5.933 | |||
| τ00, GR | 2.397 | |||
| ρ01 | 0.391 | |||
| NGR | 40 | |||
| ICCGR | 0.288 | |||
| Observations | 386 | |||
| R2 / Ω02 | .750 / .748 | |||