Download Analysis of Students' Popularity Scores and Predictors - Prof. S. C. Roesch and more Lab Reports Psychology in PDF only on Docsity!
Hierarchical Linear Modeling (HLM) Lab
PSY 775
You will first need to download a student version of HLM. This can be done at the following website:
http://www.ssicentral.com/hlm/downloads.html. Click on the link under Free Student Edition. Read
this next page carefully, and then download the HLM 6.02 (Student Edition) at the bottom of this page.
Before you can run HLM, you need to prepare your data in a statistical software package or in ASCII
format. We will be using SPSS for this purpose. You must have one data file for the variables at each
level. In the current example we will be looking at individual student's popularity scores as the level-
dependent variable and individual student's SES as a level-1 predictor variable. Additionally, we will
be interested in a class-level variable called teacher experience (in years) as a level-2 predictor. Thus,
we need two separate SPSS files for these variables. Level-1 cases must be grouped together by their
respective level-2 (e.g., school) IDs. HLM will link the level-1 and level-2 files via this common ID
across levels.
Level-1 File
Level-2 File
Once your files are created in SPSS we can enter HLM and merge them. This is quite the process so
stick with me. From the HLM pull-down window:
1. Choose Make new MDM File , Stat Package Input. A Select MDM type dialog box opens
up.
2. Select HLM2 and click OK. A Make MDM - HLM2 dialog box will open.
3. Select SPSS/Windows from the Input File Type drop-down box.
4. Click Browse in the Level-1 Specification section to open an Open Data File dialog box.
Open the level-1 SPSS data file.
5. Click Choose Variables to open up the Choose Variables - HLM2 dialog box. Choose the ID
and variables by selecting the appropriate boxes. Click OK to return to the main dialog box.
6. Select options for missing data in this section. If you have missing data, select Yes and
Making MDM. This is only for level-1. You cannot have missing data in the level-2 data
file.
Brief Overview of Main HLM Analysis Window
The variables in your active HLM data file will appear to the left. The grey bars need to be selected
depending on whether or not you want a level-1 or level-2 variable. I will give you more details in the
context of testing some models.
The first model we want to test is the intercept-only (or unconditional) model. This model will give us
a sense of how much variability exists within- and between-groups (i.e., classes). All we need to do in
HLM is select POPULAR as your (level-1) DV, click on this variable and then select Outcome
Variable. From the pull-down menu select Run Analysis and then Run the Model Shown. To open
the output file select File from the pull-down menu and then View Output.
Program: HLM 6 Hierarchical Linear and Nonlinear Modeling Authors: Stephen Raudenbush, Tony Bryk, & Richard Congdon Publisher: Scientific Software International, Inc. (c) 2000 [email protected] www.ssicentral.com
Module: HLM2.EXE (6.02.25138.2) Date: 29 November 2005, Tuesday Time: 14:21:
SPECIFICATIONS FOR THIS HLM2 RUN Problem Title: no title The data source for this run = class.ssm The command file for this run = whlmtemp.hlm Output file name = E:\Courses\775\HLM\hlm2.txt The maximum number of level-1 units = 7185 The maximum number of level-2 units = 160 The maximum number of iterations = 100 Method of estimation: restricted maximum likelihood Weighting Specification
Weight Variable Weighting? Name Normalized? Level 1 no Level 2 no Precision no The outcome variable is POPULAR The model specified for the fixed effects was:
Level-1 Level- Coefficients Predictors
INTRCPT1, B0 INTRCPT2, G The model specified for the covariance components was:
Sigma squared (constant across level-2 units) Tau dimensions INTRCPT
**Final estimation of variance components:
Random Effect Standard Variance df Chi-square P-value Deviation Component
INTRCPT1, U0 2.93501 8.61431a**^159 1660.23259 0. level-1, R 6.25686 39.14831b -----------------------------------------------------------------------------
a = τ
00
b = σ 2
Calculate the intraclass correlation coefficient using:
ρ = τ 00 / (τ 00 + σ^2 ) = 8.61431 / (8.61431 + 39.14831) =.
This tells us that 18% of the variance in popularity is between-classes and 82% is at the individual
level.
Statistics for current covariance components model
Deviance = 47116. Number of estimated parameters = 2
Mean-as Outcomes Model
To add TEACHEXP as a level-2 predictor of popularity (β 0 ), click on the Level-2 grey bar, and then
select this variable and then select add variable grand centered.
Summary of the model specified (in equation format)
Level-1 Model Y = B0 + R Level-2 Model B0 = G00 + G01*(TEACHEXP) + U The outcome variable is POPULAR Final estimation of fixed effects (with robust standard errors)
Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value
For INTRCPT1, B INTRCPT2, G00 12.637551 0.231437 54.605 158 0. TEACHEXP, G01 -0.478317 0.134053 -3.568 158 0.
The statistically significant and negative regression coefficient relation between TEACHEXP and
POPULAR tells us that those classes that have teachers with more experience have lower popularity
scores (and the converse as well).
Final estimation of variance components:
Random Effect Standard Variance df Chi-square P-value Deviation Component
INTRCPT1, U0 2.78121 7.73514a^158 1526.98310 0. level-1, R 6.25677 39.14720b
a = τ
00
b = σ 2
"R^2 " variance explained (or proportion reduction in variance) based on the level-2 predictor
TEACHEXP:
τ 00 (intercept-only) - τ 00 (means-as-outcomes) 8.61431 - 7.
τ 00 (intercept-only) 8.
So, TEACHEXP explains 10% of the between-class variance in popularity scores.
Intercepts- and Slopes-as-Outcomes Model
Using the random-coefficients regression model, add TEACHEXP as a level-2 predictor to both
equations. Click on each individual equation so that it is highlighted before you select the predictor
variable.
Summary of the model specified (in equation format)
Level-1 Model Y = B0 + B1(SES) + R Level-2 Model B0 = G00 + G01(TEACHEXP) + U B1 = G10 + G11*(TEACHEXP) + U The outcome variable is POPULAR Final estimation of fixed effects (with robust standard errors)
Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value
For INTRCPT1, B INTRCPT2, G00 12.632715 0.188708 66.943 158 0. TEACHEXP, G01 -0.354103 0.119907 -2.953 158 0. For SES slope, B INTRCPT2, G10 2.366298 0.118192 20.021 158 0. TEACHEXP, G11 -0.123754 0.070524 -1.755 158 0.081a
aif this cross-level interaction was significant, one would probe the interaction using the methods of Curran and Preacher (http://www.unc.edu/~preacher/interact/) Final estimation of variance components:
Random Effect Standard Variance df Chi-square P-value Deviation Component
INTRCPT1, U0 2.15601 4.64837a 158 875.86844 0. SES slope, U1 0.61754 0.38136b^158 206.01306 0. level-1, R 6.06605 36.79695c
a = τ
00
b = τ
11
c = σ 2
"R^2 " variance explained (or proportion reduction in variance) based on the level-2 predictor
TEACHEXP for both the intercept (β0j) and slope (β1j):
τqq (random regression) - τqq (intercepts- and slopes-)
τqq (random regression)
For β0j: (4.82974 - 4.64837) / 4.82974 = .04, so TEACHEXP explains 4% of the variance in
popularity scores when controlling for other predictors in the model.
And similarly for β1j
Note. HLM does NOT report standardized regression coefficients. In order to get these you need
to standardize the variables in your data set first, and then use these files in HLM.
The write-up (notice that I have not reported all of the information from the output)
Hierarchical linear modeling was used to statistical analyze a data structure where students (level-1)
were nested within classrooms (level-2). Of specific interest was the relation between student's ratings
of their own popularity (level-1 criterion variable) and both student-level SES (level-1 predictor
variable) and teacher's experience (a level-2 classroom variable). Model testing proceeded in 4 phases:
intercept-only model, means-as-outcome model, random-regression coefficients model, and the
intercepts- and slopes-as-outcomes model.
The intercept-only model revealed an intraclass correlation coefficient of .18. Thus, 18% of the
variance in popularity scores is between-classes and 82% of the variance in popularity scores is at the
student-level. Because variance existed at both levels of the data structure, predictors were individually
added at each level. The means-as-outcomes model added teachers' experience as a level-2 predictor
variable. The regression coefficient relating teachers' experience to students popularity was negative
and statistically significant (b = -.478, p = .001). Students' popularity levels were lower in classes with
teachers who had more experience (relative to teachers who had less experience). Next, the random-
regression coefficients model was tested using students' SES levels as the only predictor variable. The
regression coefficient relating students' SES to students' popularity was positive and statistically
significant (b = 2.39, p < .001). Students' popularity levels were higher when their SES levels were
also higher (relative to those students whose SES levels were lower). Finally, the intercepts- and
slopes-as-outcomes model was tested with all predictors tested in the model simultaneously. The
regression coefficient relating teachers' experience to students' popularity continued to be negative and
statistically significant (b = -.354, p = .004). Additionally, the regression coefficient relating student's
SES to students' popularity continued to be positive and statistically significant (b = 2.37, p < .001).
The cross-level interaction between students' SES and teachers' experience, however, was not
statistically significant (b = -.124, p = .081).