Title: HLM in 60 minutes
1HLM in 60 minutes
- Jim Hinterlong, Ph.D.
- FSU College of Social Work
- February 22, 2006
2Acknowledgments
- Shameless borrowing from ISR course
- Raudenbush, S. W., Bryk, A. S. (2002).
Hierarchical linear models (2nd Ed.). Sage. - www.wtgrantfoundation.org
- Optimal design software (free download)
3Agenda
- General Overview
- HLM with longitudinal data
- HLM with clustered, cross-sectional data
- Tips
- Summary
4Multilevel data
- Hierarchical data (HD) structures are common.
- Nested (repeated) observations
- Nested units
- Dual-nested structures (units and obs.)
5Repeated Observations
- Individual change over time
- Within person change
- Change in trajectories across individuals
- Between-person differences in change
- Growth Curve Modeling
6Nested Units (Organizations)
- Shared effects on clustered units
- Upper level units naturally occurring
7Problems faced with HD
- Aggregation bias
- Disaggregation bias (neglect nesting)
- Correlated (misestimated) error (ICC)
- Heterogeneity of regression
- Ecological fallacy (inferential errors)
- Unbalanced designs
- HLM can address these issues
8HLM a.k.a.
- Multilevel linear models (Socio)
- Mixed-effects or Random Effects (Bio)
- Random Coefficient Reg. (Econ)
- Covariance Components Models (Stats)
9Advantages of HLM
- Relaxed assumptions vis-à-vis OLS
- Flexibility in research design
- Incomplete observations
- Unequal data collection lags
- Identifies temporal patterns
- Includes time-varying predictors
- Allows interactions with time
10HLM
- Fits a regression line at individual level one
for each level 1 unit - Allows parameter estimates to vary by group
membership - Allows testing of main effects and interactions
within and between levels
11HLM Assumes
- Time is linearly associated with Y
- Residuals are normal
- Equality of variances
- Independence of uppermost level units
- Variability among units at each level
12HLM with longitudinal data
13Repeated Observations
- Can changes in opposite naming over time be
attributed to differences in IQ? - Level-1
- DV Score (opposites named)
- IV Week-1 (to aid intercept interpretation)
- Level-2
- IV IQ (grand-mean centered)
- Centering
- Affects the interpretation of the intercept.
- Can be group mean, grand mean, or around a
specific value.
14Level-1 Model Examined
r
Betas are latent variables model-based estimates
15Growth Record w/Trend, single case
300
250
Opposites naming Score
b0j
200
b1j
150
100
50
0
0
2
3
4
5
1
Week
16Level-2 Model
Mean intercept across Level-2 units
Intercept
Slope
Mean slope across Level-2 units
Level-2 Fixed Effect
Level-2 Random Effect
Combined Model
Yij g00 g01Xj g10tij g11Xjtij uoj
u1jtij rij
17Modeling Change
- Level-1 (within-person model)
- Level-2 (between-person model)
r
r
i ith person j jth group
18Model Equations
MIXED MODEL
19HLM Output
Summary of the model specified (in equation
format) -----------------------------------------
---------- Level-1 Model Y B0 B1(WEEK)
R Level-2 Model B0 G00 G01(IQ) U0 B1
G10 G11(IQ) U1
20First Step Is HLM needed?
- Random Coefficient model for Level-1
- All Level-1 variables
- Level-2 only intercept and residual
(unconditional) - Check Level-2 output
- If there is a random effect, parameter varies by
group - If no random effect or intercept at L2, the
parameter is not needed in model
YES! (Although not shown here)
21Level-1 OLS regressions -----------------------
Level-2 Unit INTRCPT1 WEEK slope
--------------------------------------------------
---------------------------- 1
196.70 34.20 2 218.00
28.50 3 151.40
47.90 4 206.40 21.90
5 199.90 9.90
6 165.60 29.60 7
159.60 32.60 8
92.90 37.90 9 138.70
22.70 10 219.80
26.80 The average OLS level-1 coefficient
for INTRCPT1 164.37429 The average OLS
level-1 coefficient for WEEK
26.96000 Sigma_squared 159.47714
Standard Error of Sigma_squared 26.95656
22 Tau INTRCPT1,B0 1159.38147 -165.31460
WEEK,B1 -165.31460 99.29807
Standard Errors of Tau INTRCPT1,B0
304.41620 78.28048 WEEK,B1
78.28048 31.82128 Tau (as correlations)
INTRCPT1,B0 1.000 -0.487 WEEK,B1 -0.487
1.000 ----------------------------------------
------------ Random level-1 Reliability
coefficient estimate --------------------------
-------------------------- INTRCPT1, B0
0.912 WEEK, B1
0.757 -------------------------------------
---------------
Correlation between Initial status and growth rate
Reliability of distinguishing between
individuals Reliability of latent variables B0
and B1
l0j
l1j
As Nj increases, reliability increases
23 Final estimation of fixed effects ---------------
--------------------------------------------------
--------------------------------------------------
------
Standard Approx. Fixed Effect
Coefficient Error T-ratio
d.f. P-value ------------------------------
--------------------------------------------------
----------------------------------------- For
INTRCPT1, B0 INTRCPT2, G00
164.374 6.026170 27.277 33 0.000
IQ, G01 -0.114
0.415881 -0.273 33 0.787 For
WEEK slope, B1 INTRCPT2, G10
26.9600 1.936075 13.925 33 0.000
IQ, G11 0.4329
0.121468 3.564 33 0.001
--------------------------------------------------
--------------------------------------------------
---------------------
HLM also produces a model with robust standard
errors Compare these with the non-robust. Sig.
differences indicate assumption checking is
needed.
24Exploratory Level-2 Residuals
IQ is not related to initial status (B0j)
Empirical Bayes estimates (corrected OLS
residuals borrowing strength from complete
cases)
25Exploratory Level-2 Residuals
IQ is related to slope (Bij)
26 Final estimation of variance components
--------------------------------------------------
--------------------------------------------------
--------------------------- Random Effect
Standard Variance df Chi-square
P-value Deviation
Component ---------------------------------------
--------------------------------------------------
----------------------------------- INTRCPT1,
U0 34.04969 1159.38147 33
398.49456 0.000 WEEK slope, U1
9.96484 99.29807 33 143.96334
0.000 level-1, R 12.62843
159.47714 -------------------------------------
--------------------------------------------------
--------------------------------------
27Individual Growth Curves
First 10 respondents
28Effect of IQ on Score Trajectory
300
IQ 9.5 (75th tile) IQ - 9.5 (25th tile)
250
Opposites naming Score
200
150
100
50
0
0
2
3
4
5
1
Week
29Examining Level-1 Residuals
Detecting Outliers
30Level-1 Residuals
31Level-1 Residuals
Testing for normality
32Unconditional Model of Growth in Opposites-naming
33Linear model of Growth in Opposite-naming
(Effects of IQ)
Didnt have time To compute
Model comparison c2 8.46, df 2, p 0.014
34- HLM with
- Clustered, Cross-sectional Data
35Nested Unit (Organization)Analysis options
- One-Way ANOVA
- Significant unconditional model reveals
clustering effect - Means-as-Outcome
- Contextual Effects
- Random Coefficients
- Random Intercept Slopes as Outcomes
36Other HLM Options
- HLM3 three-level models
- HGLM binary, count, nonlinear
- HMLM multivariate allows latent variable
analysis - Cross-classed Models observations fit under 2
upper-level clusters
37Tips
- Create separate dataset for each level
- Test descriptive stats in HLM against those
produced in SPSS - ID variable is ID of higher order unit
- Upper-most level cannot contain time-varying
covariates - Use Full Maximum Likelihood
- Produces gs
- Allows likelihood ratio testing of nested models
(use deviance, which is -2LL)
38Advantages of HLM
- Models hierarchical data structure
- Adjusts level-1 estimates for measurement error
(only DV not IV) - Permits/Uses heterogeneity of regression
- Allows categorical/continuous predictors
- Produces correct standard errors
39Advantages of HLM (cont.)
- Can model discontinuous outcomes
- Allows non-linear models
- Handles missing data at Level-1
40Software 3 general options
41End