Note: For a fuller treatment, download our series of lectures Hierarchical Linear Models.
Intercepts- and Slopes-as-Outcomes Model
R&B present a final model that includes one further generalization of the random coefficients model. They begin again with the level-1 model:
The intercept β0j is now modeled as a function of the average SES level of the school and whether or not the school is public or private. The slope β1j is modeled in a similar fashion.
Substituting (10) and (11) into (6) leads to the combined model:
To estimate (12) in SPSS go to Analyze → Mixed Models → Linear. The Specify Subjects and Repeated menu appears again. As before, place id in the Subjects box and leave Repeated blank.
Click Continue. In the next menu one specifies the dependent and independent variables. The dependent variable is mathach, and the covariates are grp_ses, meanses, and sector.
To specify the model’s fixed effects click on Fixed. The model includes both main effects for all three variables as well as one interaction between grp_ses and meanses and another between grp_ses and sector. Choose Main Effects from the drop-down menu in the center. Then bring all three variables over to the Model box.
To specify the interaction, change Main Effects to Interaction. Click on grp_ses, then hold down the Ctrl key and click on meanses. Click the Add button to bring the interaction to the Model box.
Next, click on grp_ses, hold down the Ctrl key, and click on sector. Click the Add button to bring the second interaction to the Model box.
Make sure Include Intercept is checked and click Continue. Next, click on Random to specify the random effects in the model.
In the Random Effects menu, the grouping variable id should once again appear in the Combinations box. The level-1 variable grp_ses will have a random slope, so it is necessary to place it in the Model box. The Include Intercept should also be checked to specify a random intercept. Finally, the presence of two random effects means that the dimensions of the covariance matrix G are 2×2. The default in SPSS is to assume a variance components structure, (see the table of covariance structures in A Review of Random Effects ANOVA Models). This assumption can be loosened so that the covariances are free parameters to be estimated from the data. Specify Unstructured for the Covariance Type.
Click Continue. Then click Statistics to specify what appears in the output. Check Parameter Estimates to get results for the fixed effects.
Click Continue, then OK. A portion of the results is the following:
These results correspond to Table 4.5 in R&B and the variance-covariance components on page 83. While most estimates are identical, there are some slight differences in the random effects (for example, R&B report a level-1 variance component of 36.68 whereas SPSS reports the estimate to be 36.72). In general, results will vary somewhat across software packages for more complicated models. Thus, researchers should name the software they have used when reporting results for mixed models.
Still have questions? Contact us!