Multi-Level Models CSP-770 Fall 2016

Steven Vannoy
10/5/16

Random Coefficients Regression

  • Regression by Ordinarly Least Squares (OLS) assumes observations are indendent
  • When observations are not independent:
    • E.G. When participants are clustered by some grouping factor
    • Like a study with multiple therapists, clients are grouped into therapist clusters
    • E.G. When participants are measured at more than one time point (repeated measures)
    • The Type-I error rate gets inflated (we call it significant when it is not)
  • Random Coefficients Regression, (RC), can handle dependency, (correlation), between observations

Multi-Level Modeling

  • When observations are clustered we may have predictor variables at different levels

    • E.G. - Multiple therapists treating clients in a trial
      • Level 1 factors: client charactersitics (baseline depression, age, gender, etc.)
      • Level 2 factors: therapist characteristics (degree, years of experience, etc.)
  • Multi Level Models (also heirachical linear models, mixed-effects models)

    • take into account IVs at different levels and use RC Regression to model the data

Assessing the Degree of Clustering

  • The question is, are members of a cluster more like themselves than they are like the members of other groups?
    • If so, ignoring this factor inflates alpha.
    • The more group members are alike one another, the greater the inflation.
  • Clustering is categorized using the Intraclass correlation or ICC
  • The ICC measures the proporton of total variance of a variable that is accounted by the group membership
  • ICC ranges from 0 to 1

Example - CCWA Weight Loss

  • 40 Groups of Women Enrolled in Weight Loss Program
  • Question - does pounds lost depend on motivation?
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

CCWA Weight Loss Cont...

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 \]

What does this look like?

The typical regression with one predictor

  • \[ \hat{Y} = B_0 + B_TX_1 \] plot of chunk unnamed-chunk-6

Simple accounting of group differences

  • \( \hat{Y} = B_1X_{ij} + B_{0j} \) (group j)

plot of chunk unnamed-chunk-7

Full accounting of group differences

  • \( \hat{Y} = B_{1j}X_{ij} + B_{0j} \) (group j)

plot of chunk unnamed-chunk-8

Disaggregated analysis using group means of predictor and criterion

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

Aggregated analysis using group means of predictor and criterion

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

Disaggregated anlysis with dummy coded groups

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

  • R2 = 0.297, F(39, 346) = 3.75
    Adding motivation
  • R2 = 0.704, F(40, 345) = 20.48

The Random Coefficients (RC) Regression Model

  • When data are clustered, RC:
    • Provides accurate estimates of individual level predictors to a dependent variable
    • Provides accurate estimates of the standard errors
  • Supports multilevel modeling (aka hierachical linear modeling)
    • Distinct predictors at different levels of analysis
    • students in classrooms: achievement tests and class size

Fixed and Random Variables


  • \( \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

Clustering and Hierarchically Structured Data

  • In RC regression we still have a population regression equation
  • However, we add complexity by adding hierarchical structure (clustering)
  • The lowest level of aggregation is referred to as level 1 (micro level)
    • This is what we've been used to, level 1 refers to the individual cases (rows)
  • The cluster (group) level is referred to as level 2 (macro level)
  • There can be may levels
  • Clusters (level 2) assumed to be random variables

RC Notation

  • A. Coefficients in micro-level equationfor group j

    • \( \underline{\beta_{0j}} \) = level 1 regression intercept for group j
    • \( \underline{\beta_{1j}} \) = level 1 regression coefficient (slope) for group j
  • B. Fixed population regression coefficients: the fixed part of the model

    • \( \gamma_{00} \) = the population intercept (what we are used to thinking about)
    • \( \gamma_{10} \) = the population coefficient for the level 1 IV
    • \( \gamma_{01} \) = the population coefficient for the level 2 IV
    • \( \gamma_{11} \) = the population coefficient for the interaction between level 1 & 2 IVs
  • C. Residuals and variance components: the random part of the model

    1. Residuals.
      • \( \underline{r_{ij}} \) = level 1 error for subject i in group j (residuals for level 1 equation)
      • \( \underline{u_{0j}} \) = random deviation of the intercept of the individual group j from the population intercept (level 2)
      • \( \underline{u_{1j}} \) = random deviation of the regression coefficient of an individual group j from the population coefficient (level 2)
    2. Variance components
      • \( \sigma^2 \) = variance due to random error at level 1 (variance of residuals)
      • \( \tau_{00} \) = variance of the random intercepts
      • \( \tau_{11} \) = variance of the random regression coefficients
      • \( \tau_{01} \) = covariance between errors of the random regression coefficients and the random regression intercepts

Back to the weight loss group example

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

More with the weight loss group example

    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

Repeated measures

  • Longitudinal data is conceptually a matter of nesting time points within individuals
  • Hence the interest is in differences in outcome measured at time1, time2, … time(k)