This chapter uses the data file on popularity of students. We use SPSS file format since HLM directly import SPSS data files. In order to perform the analyses in HLM, we need to get a data file for level-2. This is obtained by simply aggregating the level-1 data file by SCHOOL. Here are the two SPSS data files, https://stats.idre.ucla.edu/wp-content/uploads/2016/02/popular.sav and https://stats.idre.ucla.edu/wp-content/uploads/2016/02/popular_lev2.sav needed for this chapter. The variable that links these two files is SCHOOL. We assume that an SSM file has been created based on these two data files.
Table 2.1 on page 17.
Part1: Intercept only. (M0)
Sigma_squared = 0.63868 Tau INTRCPT1,B0 0.87981 Tau (as correlations) INTRCPT1,B0 1.000 ---------------------------------------------------- Random level-1 coefficient Reliability estimate ---------------------------------------------------- INTRCPT1, B0 0.965 ---------------------------------------------------- The value of the likelihood function at iteration 2 = -2.556874E+003 Final estimation of fixed effects: ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 5.307603 0.095504 55.575 99 0.000 ---------------------------------------------------------------------------- Final estimation of fixed effects (with robust standard errors) ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 5.307603 0.095023 55.856 99 0.000 ---------------------------------------------------------------------------- Final estimation of variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, U0 0.93798 0.87981 99 2803.92595 0.000 level-1, R 0.79917 0.63868 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 5113.748909 Number of estimated parameters = 2
Part 2: The variable sex is included as a random effect and teacher experience (texp) as fixed effect (M1).
Sigma_squared = 0.39248 Tau INTRCPT1,B0 0.41155 0.02093 SEX,B1 0.02093 0.27329 Tau (as correlations) INTRCPT1,B0 1.000 0.062 SEX,B1 0.062 1.000 ---------------------------------------------------- Random level-1 coefficient Reliability estimate ---------------------------------------------------- INTRCPT1, B0 0.911 SEX, B1 0.767 ---------------------------------------------------- The value of the likelihood function at iteration 6 = -2.137029E+003 Final estimation of fixed effects: ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 3.339816 0.160775 20.773 99 0.000 For SEX slope, B1 INTRCPT2, G10 0.843146 0.059689 14.126 99 0.000 For TEXP slope, B2 INTRCPT2, G20 0.108363 0.010215 10.609 1997 0.000 ---------------------------------------------------------------------------- Final estimation of fixed effects (with robust standard errors) ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 3.339816 0.165505 20.180 99 0.000 For SEX slope, B1 INTRCPT2, G10 0.843146 0.059388 14.197 99 0.000 For TEXP slope, B2 INTRCPT2, G20 0.108363 0.011382 9.521 1997 0.000 ---------------------------------------------------------------------------- Final estimation of variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, U0 0.64152 0.41155 99 1125.84022 0.000 SEX slope, U1 0.52277 0.27329 99 426.12953 0.000 level-1, R 0.62648 0.39248 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 4274.057054 Number of estimated parameters = 4
Table 2.2 on page 20.
Part 1: M1, as shown above.
Part 2: Cross-level interaction with teacher experience (M2).
Sigma_squared = 0.39241 Tau INTRCPT1,B0 0.41198 0.02342 SEX,B1 0.02342 0.22641 Tau (as correlations) INTRCPT1,B0 1.000 0.077 SEX,B1 0.077 1.000 ---------------------------------------------------- Random level-1 coefficient Reliability estimate ---------------------------------------------------- INTRCPT1, B0 0.911 SEX, B1 0.731 ---------------------------------------------------- The value of the likelihood function at iteration 6 = -2.134216E+003 Final estimation of fixed effects: ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 3.313521 0.161014 20.579 98 0.000 MTEXP, G01 0.110235 0.010232 10.774 98 0.000 For SEX slope, B1 INTRCPT2, G10 1.329594 0.133051 9.993 98 0.000 MTEXP, G11 -0.034035 0.008457 -4.024 98 0.000 ---------------------------------------------------------------------------- Final estimation of fixed effects (with robust standard errors) ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 3.313521 0.167064 19.834 98 0.000 MTEXP, G01 0.110235 0.011466 9.614 98 0.000 For SEX slope, B1 INTRCPT2, G10 1.329594 0.108340 12.272 98 0.000 MTEXP, G11 -0.034035 0.007293 -4.667 98 0.000 ---------------------------------------------------------------------------- Final estimation of variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, U0 0.64186 0.41198 98 1126.47092 0.000 SEX slope, U1 0.47583 0.22641 98 367.94122 0.000 level-1, R 0.62643 0.39241 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 4268.431480 Number of estimated parameters = 4
Table 2.3 on page 21.
Part 1: M1 from Table 2.2.
Part 2: Standardized variables. Since HLM doesn’t have any data management ability, we have to create these standardized variables somewhere else. We choose to do it in SPSS since we use SPSS data format when creating a SSM file. Here is the SPSS file with standardized variables. We assume that an SSM will be created based on this level-1 data file and the level-2 data file provided before.
Sigma_squared = 0.26115 Tau INTRCPT1,B0 0.33052 0.05123 ZSEX,B1 0.05123 0.04546 Tau (as correlations) INTRCPT1,B0 1.000 0.418 ZSEX,B1 0.418 1.000 ---------------------------------------------------- Random level-1 coefficient Reliability estimate ---------------------------------------------------- INTRCPT1, B0 0.960 ZSEX, B1 0.767 ---------------------------------------------------- The value of the likelihood function at iteration 6 = -1.729065E+003 Final estimation of fixed effects: ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 -0.009780 0.058670 -0.167 99 0.868 For ZSEX slope, B1 INTRCPT2, G10 0.343852 0.024344 14.125 99 0.000 For ZTEXP slope, B2 INTRCPT2, G20 0.579106 0.054592 10.608 1997 0.000 ---------------------------------------------------------------------------- Final estimation of fixed effects (with robust standard errors) ---------------------------------------------------------------------------- Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ---------------------------------------------------------------------------- For INTRCPT1, B0 INTRCPT2, G00 -0.009780 0.058070 -0.168 99 0.867 For ZSEX slope, B1 INTRCPT2, G10 0.343852 0.024220 14.197 99 0.000 For ZTEXP slope, B2 INTRCPT2, G20 0.579106 0.060828 9.520 1997 0.000 ---------------------------------------------------------------------------- Final estimation of variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, U0 0.57491 0.33052 99 2433.70795 0.000 ZSEX slope, U1 0.21321 0.04546 99 426.13100 0.000 level-1, R 0.51103 0.26115 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 3458.129869 Number of estimated parameters = 4
Figure 2.1 to Figure 2.6. HLM does not much plotting ability and no data management facility. In order to create these plots, we need to save the residual file in other statistical software, such as SAS, SPSS or SYSTAT and perform necessary data management steps before we can actually graph them. Combining with the model estimate, the residual file is enough, in theory at least, for creating all the plots in this chapter. But actually doing will take a lot of efforts. We therefore would refer anyone to the same chapter done in other packages.