Sie sind auf Seite 1von 6

Hierarchical Linear Modeling in SPSS

STEP 1. Set up the analysis. Open the correct data files with one line of data per subject per
time period. Only proceed if the dependent variable is normally distributed at each time point
(e.g., not skewed). SPSS cannot run nonlinear HLM. You can check the normality assumption by
running the Explore/Plots command.

Click the Plots button, and in the Explore: Plots dialog box, select Histogram and
Normality plots with tests.

If the output shows that the Shapiro-Wilk statistic value is larger than .8 then its safe to assume
that the distribution is normal.
STEP 2. Specify and run the analysis. Specify fixed effects and random effects. All three models
below include a residual error term (R). Begin with Model 3, and then check the output to see if
a simpler model is needed. Replace the text depvar with the name of your dependent variable.
Select a Linear Mixed Model analysis.

Specify the Subjects variable. Leave Repeated section blank so that the analysis does not use
the RANDOM command.

Specify the variables.

Select the main effects for fixed effects.

Model 1 syntax: Random Intercept Model (but no random slope term)


MIXED
depvar BY clientid cond WITH time
/FIXED = cond time cond*time | SSTYPE(3)
/METHOD = REML
/PRINT = COVB SOLUTION TESTCOV
/RANDOM intercept | SUBJECT(clientid) COVTYPE(ID)
/TEST 'condition0 slope' time 1 cond*time 1 0
/TEST 'condition1 slope' time 1 cond*time 0 1
/TEST 'Diff slope test' cond*time 1 -1
/TEST 'Pooled slope' time 1 cond*time 0.5 0.5.

Model 2 syntax: Random Intercept and Random Slope (but their correlation not modeled)
MIXED
depvar BY clientid cond WITH time
/FIXED = cond time cond*time | SSTYPE(3)
/METHOD = REML
/PRINT = COVB SOLUTION TESTCOV

/RANDOM intercept time | SUBJECT(clientid) COVTYPE(VC)


/EMMEANS = TABLES(cond) COMPARE ADJ(LSD)
/TEST 'condition0 slope' time 1 cond*time 1 0
/TEST 'condition1 slope' time 1 cond*time 0 1
/TEST 'Diff slope test' cond*time 1 -1
/TEST 'Pooled slope' time 1 cond*time 0.5 0.5.

Model 3 syntax: Random Intercept and Random Slope (Correlated)


MIXED
depvar BY clientid cond WITH time
/FIXED = cond time cond*time | SSTYPE(3)
/METHOD = REML
/PRINT = COVB SOLUTION TESTCOV
/RANDOM intercept time | SUBJECT(clientid) COVTYPE(UN)
/EMMEANS = TABLES(cond) COMPARE ADJ(LSD)
/TEST = 'condition0 slope' time 1 cond*time 1 0
/TEST = 'condition1 slope' time 1 cond*time 0 1
/TEST ='Diff slope test' cond*time 1 -1
/TEST 'Pooled slope' time 1 cond*time 0.5 0.5.

To get estimated marginal (adjusted) means per condition per time period, time must be specified
as a categorical variable. In the Linear Mixed Model dialog box, click EM Means.

MIXED
phhrisk BY cond0 clientid time0
/FIXED = cond0 time0 cond0*time0 | SSTYPE(3)
/METHOD = REML
/RANDOM INTERCEPT | SUBJECT(clientid) COVTYPE(ID)
/EMMEANS = TABLES(cond0*time0).

STEP 3. View the output.


Check the appropriateness of the random effects terms by examining the section of output called
Estimates of Covariance Parameters. If a random effect (i.e., covariance parameter) is not
significant (or omitted) in this table, then remove it from the model by running the appropriate
syntax for a simpler model (e.g., Model 1 or 2). The error message The final Hessian matrix is
not positive definite indicates that a simpler model is needed.
Examine the section called Type III Tests of Fixed Effects. The condition-by-time interaction
effect indicates if the slopes differ between conditions. The time effect indicates if there are
overall changes in the dependent variable (i.e., slope). The condition effect indicates if there are
overall differences between conditions in the means of dependent variable (including the first
time point).
To interpret the results, it is necessary to understand how SPSS codes the independent variable
(e.g., treatment condition). SPSS arbitrarily chooses the "constrained" group (i.e., the one coded
as zero, meaning that the intercept is the mean for that group and the main slope coefficient is the
slope for that group). In other words, the HLM coefficients will be in reference to this
constrained group. Check the Estimates of Fixed Effects to see which condition is constrained.
There will be no estimate given.

Das könnte Ihnen auch gefallen