HIERARCHICAL LINEAR MODELS

Download Report

Transcript HIERARCHICAL LINEAR MODELS

HIERARCHICAL LINEAR
MODELS
NESTED DESIGNS
• A factor A is said to be nested in factor B if
the levels of A are divided among the levels
of B. This is given the notation A(B). We
have encountered nesting before, since
Subjects are typically nested in Treatment,
S(T), in the randomized two group
experiment.
NESTED DESIGNS
TREATMENT
Subject
01
02
03
T1
04
05
06
T2
07
08
09
10
Table 11.4: Nested design with subjects nested in treatment
NESTED DESIGNS
SCHOOL
CLASSROOM
01
02
03
S1
04
05
06
S2
07
08
09
10
Table 11.4: Nested design with Classrooms nested in Schools
ANOVA TABLE
ANOVA table
Source
df
Expected mean square
F-test
S
s-1
2 +p2C + cp2S
MSS/MSC
C(S)
s(c-1)
2 +p2C
MSC/MSP
2
none
P(C,S) sc(p-1)
Note: no interactions can occur between nested factors
ESTIMATING VARIANCES
2

C
= (MSC – MSP )/p
Conceptually this is
= (2 +p2c - 2)/p
TESTING CONTRASTS
• Thus, if one wanted to compare School 1 to
School 2, the contrast would be
C12 = [ Xschool 1 - Xschool 2 ]
• Since the school mean is equal to overall
mean + school 1 effect + error of school:
•
Xschool 1 =  ...+ 1. + e1. ,
TESTING CONTRASTS
• the variance of School 1 is
•
VAR(Xschool 1 ) = { 2 + 2S }/s
•
= { MS(P(C(S))) + [MS(S) MS(C(S)]/cp} / s
Then t = C12 /{ 2[MS(P(C(S)))+[MS(S)-MS(C(S)]/cp]/s}
which is t-distributed with 1, df= Satterthwaite approximation
Satterthwaite approximation
df= { cpMS(P(C(S)))/s + [MS(S) - MS(C(S)]/s }2
{cpMS(P(C(S)))/s }2 + {[MS(S)}2 + {MS(C(S)]/s }2
(p-1)cs
cp(s-1)
p(c-1)
HLM - GLM differences
• GLM uses incorrect error terms in HLM
designs
– Multiple comparisons using GLM estimates
will be incorrect in many designs
• HLM uses estimates of all variances
associated with an effect to calculate error
terms
Repeated Measures
• Multiple measurements on the same
individual
– Time series
– Identically scaled variables
• Measurements on related individuals or
units
– Siblings (youngest to oldest among trios of
brothers)
– Spatially ordered observations along a
dimension
WITHIN-GROUP DESIGNS
Within group designs
We encountered a repeated measures design in Chapter Six
in the guise of the dependent t-test design. :
_
_
t = x1. – x2. / sd
where
sd = [ ( s21 + s22 – 2 r12 s1s2 )/n ]1/2
WITHIN-GROUP DESIGNS
MODEL
•
•
•
•
•
•
y ij =  + i + j + eij
where y ij = score of person i at time j,
 = mean of all persons over all occasions,
i = effect of person i,
j = effect of occasion j,
eij = error or unpredictable part of score.
If we represent the design by a graphical two-dimensional chart, it looks like Fig. 11.1:
Person
1
2
Time 3
4
…
O
1
2
3
.
.
.
P
Fig. 11.1: Two-way layout for within-subject P x O repeated measures design
EXPECTED MEAN SQUARES
FOR WITHIN-GROUP DESIGN
Source
df
Expected mean square
P
P-1
2e + O2
O
O-1
2e + 2 + P2
PO
error
(P-1)(O-1) 2e + 2
0
2e
Table 11.1: Expected mean square table for P x O design
EXPECTED MEAN SQUARES
FOR WITHIN-GROUP DESIGN
ANOVA Table
Source
df
Within-subject
Person
P-1
SS
MS
F
OS(yi. – y..)2 SSP/(P-1)
MSO/MSPO
Occasion
O-1
PS(y.j – y..)2
PxO
(P-1)(O-1)
SS( yij – y..)2 SSPO/(P-1)(O-1)
-
error
0
0
-
SSO/(O-1)
VENN DIAGRAM FOR WITHIN-GROUP
DESIGN
SSDependent Variable
Person x Occasion
Person
SSe
Occasion
Fig. 11.2: Venn diagram for two factor repeated measures ANOVA design
SPHERICITY ASSUMPTION
ij = ij for all j, j (equal covariances) and ij = ij for all I and j (equal
variances)
By treating each occasion as a variable, we can represent this covariance matrix,
called a compound symmetric matrix, as
11
12
13
…
S=
21
22
23
…
31
32
33
…
.
.
with 12 = 21 = 31 = 32
Testing Sphericity
• GLM uses Huynh-Feldt or GreenhouseGeisser corrections to the degrees of
freedom as sphericity is violated
– reduces degrees of freedom and power
• HLM allows specifying the form of the
covariance matrix
– Compound symmetry (sphericity)
– Autoregressive processes
– Unstructured covariance (no limitations)
Factorial Within-Group Designs
Source
df
Expected mean square
F-test
P
P-1
2e + AB2
none
A
A-1
2e + B2a + PB2a
MSa/MSAP
2e + B2a
none
2e + A2b + PA2b
MSB/MSBP
2e + A2
none
2e + 2ab + P2ab
MSAB/MSABP
AP
B
BP
(A-1)(P-1)
B-1
(P-1)(B-1)
AB
(A-1)(B-1)
ABP
(P-1)(A-1)(B-1) 2e + 2ab
error
0
2e
none
none
Table 11.3: Expected mean square table for P x A x B within group factorial
design
Between- and Within-group Designs
BETWEEN
SOURCE df
Treat
1
Person
18
WITHIN
Time
2
Treat x Time 2
P(Treat) x Time 36
SS
20
90
MS F
error term
20 4.0 P(Treat)
5.0
-
50
30
72
25 12.5
15
7.5
2.0
P(Treat) x Time
P(Treat) x Time
-
Venn Diagram for Between and Within Design
Treatment
Between-Subject SS
Subject within treatment
Within-Subject SS
Occasion
Subject(treatment) by occasion
Treatment by occasion
Figure 11.3: Venn diagram of 2 (between) x 2 (within) factorial design
Doubly Repeated (Time x Rep) Between and Within
Design
BETWEEN
WITHIN
Time
Treatment
Time x
Treatment
Person
(Treatment)
Treatment
x Rep
Person
(Treatment) Treatment
x Rep
x Rep x
Time
Rep
Time x Rep
Person
(Treatment)
x Time
Person
(Treatment)
x Time x
Rep
HLM-GLM distinctions
• HLM correctly estimates contrasts for any
hierarchical between-factors
• HLM correctly estimates all within-subject
contrasts
• GLM does not estimate within-subject
contrasts correctly
SPSS Output for Repeated Measures Design with 4 Repetitions
Descriptive Statistics
Mean
Std. Deviation
N
S1
46.0108
10.1697
1659
S2
53.6950
11.8585
1659
S3
52.2508
10.6373
1659
S4
53.1025
11.5490
1659
Mauchly's Test of Sphericityb
Measure: MEASURE_1
Mauchly's W
Epsilona
Greenhouse-Geisser Huynh-Feldt
Lower-bound
REP
.602
840.200
5 .000 .731
.732
.333
Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is
proportional to an identity matrix.
a
May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are
displayed in the layers (by default) of the Tests of Within Subjects Effects table.
b
Design: Intercept
Approx. Chi-Square df Sig.
Tests of Within-Subj ects Effects
Meas ure: MEASURE_1
Spheric ity As sumed
Type III
Sum of
Sourc e
Squares
FACT OR1
62808.063
Error(FACT OR1) 632253.7
Mean
Square
3 20936.021
4974
127.112
df
F
164.706
Sig.
.000
Eta
Squared
.090
Nonc ent.
Parameter
494.117
Observed
a
Power
1.000
a. Computed us ing alpha = .05
The corrections to the F-test should be made given that the sphericity test
was significant. For Greenhouse-Geisser, the df for the F-test are reduced to
1, N-1 or 1, 1658, so that the F-statistic is still significant at p < .001. For
the Huynh and Feldt epsilon statistic, the degrees of freedom are adjusted
by the amount .732: dfnumerator = 3 x .732 = 2.196; dfdenominator = 4974 x .732
= 3640.968. The fraction df can either be rounded down or a program, such
as available in SAS, can provide the exact probability. For the df = 2,3640
the F-statistic is still significant. Kirk (1996) discussed in detail various
adjustments and recommends one by Collier, Baker, Mandeville, and Hayes
(1967), but the computation is cumbersome; HLM analyses compute it.