Introduction to Hierarchical Models

Corey Sparks
DEM 7903, Fall 2014

Random Slopes

  • The random intercepts model allowed the mean for each group to be different and to allow for inclusion of group level covariates
  • The random slopes model allows the relationship between the individual level covariates to vary between groups
  • In a way, this lets us see if the relationship between any of our x's and our outcome is consistent across our higher level units

Random Slopes

  • We expand the random effect model to include group-varying slopes by: \[ \begin{aligned} \ E( Y) = \beta_{0j}+ \beta_{ j} x\\ \beta_{0j} = \beta_0 + u_{1j}\\ \beta_{j} = \beta + u_{2j}\\ \end{aligned}\\ \text{Where } \beta_0 \text{ is the average intercept, and } u_{1j } \text{ is }\\ \text{the group-specific deviation in the intercept}\\ \text{And where } \beta \text{ is the average slope, and } u_{2j } \text{ is}\\ \text{the group-specific deviation in the average slope}\\ \]

Random Slopes

*Now we have two random effects in our model, \( u_1 \) and \( u_2 \)

  • instead of having each of them come from independent Normal distributions,
  • We instead let \( u_1 \) and \( u_2 \) be Multivariate Normal random variables:

Random Slopes

  • Let \( \mathbf{u} \) be the vector of \( u_1 \) and \( u_2 \)

\[ \mathbf{u} \text{~} \mathbf{MVN (0, \Sigma )} \]

  • Where \( \Sigma \) is the variance-covariance matrix of the u's \[ \mathbf{\Sigma = \begin{bmatrix} \sigma_1&\sigma_{12} \\ \sigma_{21}&\sigma_{2} \end{bmatrix}} \]

  • And \( \sigma_1 \) and \( \sigma_2 \) being the variances of each of our random effects

  • Which is just like we saw in the random intercept model, only now we have 2 random effects

Graphical Representation of Random Slopes

  • Graphically the random intercepts and slopes can be seen as: test

Variance components (again!)

  • Now we have a more complex model, and we have more variance components we can write the total variance as:

\( \sigma^2 \) = \( \sigma^2 _{e}+\sigma^2 _{u1}+\sigma^2 _{u2} \)

  • These are called the “variance components” of the random slope and intercept model