Repeated Measures Designs

Download Report

Transcript Repeated Measures Designs

Repeated Measures Designs
In a Repeated Measures Design
We have experimental units that
• may be grouped according to one or several
factors (the grouping factors)
Then on each experimental unit we have
• not a single measurement but a group of
measurements (the repeated measures)
• The repeated measures may be taken at
combinations of levels of one or several
factors (The repeated measures factors)
Example 1
• No grouping factors
• One repeated measure factor (time)
Example
In the following study the experimenter was
interested in how the level of a certain enzyme
changed in cardiac patients after open heart
surgery.
The enzyme was measured
• immediately after surgery (Day 0),
• one day (Day 1),
• two days (Day 2) and
• one week (Day 7) after surgery
for n = 15 cardiac surgical patients.
The data is given in the table below.
Table: The enzyme levels -immediately after surgery (Day 0),
one day (Day 1),two days (Day 2) and one week (Day 7)
after surgery
Subject
1
2
3
4
5
6
7
8
Day 0 Day 1 Day 2 Day 7
108
63
45
42
112
75
56
52
114
75
51
46
129
87
69
69
115
71
52
54
122
80
68
68
105
71
52
54
117
77
54
61
Subject
9
10
11
12
13
14
15
Day 0 Day 1 Day 2 Day 7
106
65
49
49
110
70
46
47
120
85
60
62
118
78
51
56
110
65
46
47
132
92
73
63
127
90
73
68
• The subjects are not grouped (single group).
• There is one repeated measures factor Time – with levels
–
–
–
–
Day 0,
Day 1,
Day 2,
Day 7
• This design is the same as a randomized
block design with
– Blocks = subjects
The Anova Model for a simple
repeated measures design
Repeated measures
subjects
y11 y12 y13 … y1t
y21 y22 y23 … y2t
yn1 yn2 y13 … ynt
The Model
yij = the jth repeated measure on the ith subject
= m + ai + tj + eij
where m = the mean effect,
ai = the effect of subject i,
tj = the effect of time j,
eij = random error.
 ̴
ai
N  0,  a2 
 t

 t j  0 
 j 1

 ̴
e ij
N  0,  2 


The Analysis of Variance
The Sums of Squares
n
1. SSSubject  t   yi  y 
2
i 1
- used to measure the variability of ai
(between subject variability)
2. SSTime  n y j  y 
t
2
j 1
- used to test for the differences in tj (time)
3. SSError   yij  yi  y j  y 
n
t
i 1 j 1
2
- used to measure the variability of eij (within
subject variability)
ANOVA table – Repeated measures (no grouping
factor, 1 repeated measures factor (time))
Source
Between
Subject Error
Time
Between
Subject Error
S.S.
d.f.
M.S
SSSubject
n-1
MSSubject
SSTime
SSError
t-1
MSTime
MSError
(n - 1)(t - 1)
F
MS Time
MS Error
The Anova Table for Enzyme Experiment
Source
Subject
Day
ERROR
SS
4221.100
36282.267
390.233
df
MS
14
301.507
3 12094.089
42
9.291
F
32.45
1301.66
p-value
0.0000
0.0000
The Subject Source of variability is modelling the
variability between subjects
The ERROR Source of variability is modelling the
variability within subjects
The repeated
measures are
in columns
Analysis Using SPSS
- the data file
Select General Linear model -> Repeated Measures
Specify the repeated measures factors and the number
of levels
Specify the variables that represent the levels of the
repeated measures factor
There is no Between subject factor in this example
The ANOVA table
Tests of Within-Subjects Effects
Measure: MEASURE_1
Source
TIME
Error(TIME)
Type III
Sum of
Squares
Sphericity As sumed 36282.267
Greenhouse-Geis ser 36282.267
Huynh-Feldt
36282.267
Lower-bound
36282.267
Sphericity As sumed
390.233
Greenhouse-Geis ser
390.233
Huynh-Feldt
390.233
Lower-bound
390.233
df
3
2.588
3.000
1.000
42
36.225
42.000
14.000
Mean
Square
12094.089
14021.994
12094.089
36282.267
9.291
10.772
9.291
27.874
F
1301.662
1301.662
1301.662
1301.662
Sig.
.000
.000
.000
.000
The Anova Table for Enzyme Experiment
Source
Subject
Day
ERROR
SS
4221.100
36282.267
390.233
df
MS
14
301.507
3 12094.089
42
9.291
F
32.45
1301.66
p-value
0.0000
0.0000
The Subject Source of variability is modelling the
variability between subjects
The ERROR Source of variability is modelling the
variability within subjects
The general Repeated Measures
Design
g groups of n subjects
t repeated measures
In a Repeated Measures Design
We have experimental units that
• may be grouped according to one or several
factors (the grouping factors – df = g - 1)
Then on each experimental unit we have
• not a single measurement but a group of
measurements (the repeated measures)
• The repeated measures may be taken at
combinations of levels of one or several factors
(The repeated measures factors – df = t - 1)
• There are also the interaction effects between the
grouping and repeated measures factors – df =
(g -1)(t -1)
The Model - Repeated Measures Design
yobservation   m mean 
Main effects,interactionsGroupingfactors 
Betweensubject Error 
Main effects,interactionsRM factors 
Interactio
nsGrouping& RM factors 
e
1
e 2 Withinsubject Error
ANOVA table for the general repeated measures design
Source
d.f.
Main effects and interactions of
g-1
grouping factors
Between subject Error
g(n – 1)
interactions of grouping factors
with repeated measures factors
(t – 1)(g – 1)
Main effects and interactions of
repeated measures factors
t-1
Within subject Error
g(t – 1)(n – 1)
Example :
(Repeated Measures Design - Grouping Factor)
• In the following study, similar to example 3,
the experimenter was interested in how the
level of a certain enzyme changed in cardiac
patients after open heart surgery.
• In addition the experimenter was interested in
how two drug treatments (A and B) would
also effect the level of the enzyme.
• The 24 patients were randomly divided into three
groups of n= 8 patients.
• The first group of patients were left untreated as a
control group while
• the second and third group were given drug
treatments A and B respectively.
• Again the enzyme was measured immediately after
surgery (Day 0), one day (Day 1), two days (Day 2)
and one week (Day 7) after surgery for each of the
cardiac surgical patients in the study.
Table: The enzyme levels - immediately after surgery (Day 0),
one day (Day 1),two days (Day 2) and one week (Day 7)
after surgery for three treatment groups (control, Drug A,
Drug B)
0
122
112
129
115
126
118
115
112
Control
Day
1
2
87
68
75
55
80
66
71
54
89
70
81
62
73
56
67
53
7
58
48
64
52
71
60
49
44
0
93
78
109
104
108
116
108
110
Group
Drug A
Day
1
2
56
36
51
33
73
58
75
57
71
57
76
58
64
54
80
63
7
37
34
49
60
65
58
47
62
0
86
100
122
101
112
106
90
110
Drug B
Day
1
2
46
30
67
50
97
80
58
45
78
67
74
54
59
43
76
64
7
31
50
72
43
66
54
38
58
• The subjects are grouped by treatment
– control,
– Drug A,
– Drug B
• There is one repeated measures factor Time – with levels
–
–
–
–
Day 0,
Day 1,
Day 2,
Day 7
The Anova Table
Source
Drug
Error1
Time
Time x Drug
Error2
SS
1745.396
df
2
MS
872.698
10287.844
47067.031
357.688
21
3
6
489.897
15689.010
59.615
668.031
63
10.604
F
1.78
p-value
0.1929
1479.58
5.62
0.0000
0.0001
There are two sources of Error in a repeated
measures design:
The between subject error – Error1 and
the within subject error – Error2
The Model
yikj = the jth repeated measure on the ith subject
in the kth group
= m + ak +ekj (1) + tj  atki + ekij(2)
where m = the mean effect,
ak = the effect of group i,
eij(1) =
 g

 a k  0 
 k 1

between subject error.
tj = the effect of time j,

e ij(1)
 t

 t j  0 
 j 1

N  0,  12 

(at)kj = the group-time interaction effect
t
 g

  at kj   at kj  0 
j 1
 k 1

eij(2) =
within subject error.

e ij(2)
N  0,  22 

Tables of means
Drug
Control
A
B
Overall
Day 0
118.63
103.25
103.38
108.42
Day 1
77.88
68.25
69.38
71.83
Day 2
60.50
52.00
54.13
55.54
Day 7
55.75
51.50
51.50
52.92
Overall
78.19
68.75
69.59
72.18
120
Time Profiles of Enzyme Levels
100
Control
Enzyme Level
Drug A
Drug B
80
60
40
0
1
2
3
Day
4
5
6
7
Example :
Repeated Measures Design - Two Grouping Factors
• In the following example , the researcher was
interested in how the levels of Anxiety (high and
low) and Tension (none and high) affected error
rates in performing a specified task.
• In addition the researcher was interested in how the
error rates also changed over time.
• Four groups of three subjects diagnosed in the four
Anxiety-Tension categories were asked to perform
the task at four different times patients in the study.
The number of errors committed at each instance is
tabulated below.
Anxiety
Low
High
Tension
None
subject
1
2
3
18
19
14
14
12
10
12
8
6
6
4
2
1
16
12
10
4
High
subject
2
3
12
18
8
10
6
5
2
1
None
subject
1
2
3
16
18
16
10
8
12
8
4
6
4
1
2
High
subject
1
2
3
19
16
16
16
14
12
10
10
8
8
9
8
The Model
ykmji = the ith repeated measure on the jth subject
when Anxiety (A) is at the kth level and
Tension (T) is at the mth level
= m + ak + bm + (abkm +ekmj (1) + ti
 atki  btmi  abtkmi + eikmji(2)
where m = the mean effect,
g

ak = the effect of Anxiety k,  a k  0 
 k 1

bm = the effect of Tension m,
(ab)km = Anxiety–Tension interaction m,
(1)
2
ekmj(1) = between subject error. ekmj
N
0,


ij
1 
tj = the effect of time j,
 t

 t j  0 
 j 1

(at)ki = the anxiety-time interaction effect
(bt)mi = the tension-time interaction effect
(abt)kmi = the tension-time interaction effect
ekmji(2) = within subject error.

(2)
e ijkmji
N  0,  22 

The Anova Table
Source
Anxiety
Tension
AT
SS
10.08333
8.33333
80.08333
df
1
1
1
MS
10.08333
8.33333
80.08333
F
0.98
0.81
7.77
p-value
0.3517
0.3949
0.0237
Error1
B
BA
BT
BAT
82.85
991.5
8.41667
12.16667
12.75
8
3
3
3
3
10.3125
330.5
2.80556
4.05556
4.25
152.05
1.29
1.87
1.96
0
0.3003
0.1624
0.1477
Error2
52.16667
24
2.17361
The Multivariate Model for a
Repeated measures design
The Anova (univariate) Model
yij = the jth repeated measure on the ith subject
= m + aj + tj + eij
where m = the mean effect,

aj = the effect of subject i,
N  0,  a2 
 t

 t j  0 
 j 1

tj = the effect of time j,
eij = random error.
ai

e ij
N  0,  a2 


Implications of The Anova (univariate) Model
mj = the mean of y ij
 E  yij   E  m   E a i   E t j   E  e ij 
= m + 0 + tj + 0 = m + tj

var  yij   E  yij  mi 
2
  E  a  e  
 E a  2a ie ij  e
2
i
2
i
2
ij

ij
 a  
2
2


 E  a  e  a  e  
 E a  a e  e   e e 
cov  yij , yij   E  yij  mi   yij  mi 
i
2
i
ij
i
i
ij
ij 
ij 
ij ij 
  a2
a
  correlation between yij and yij 2
a   2
2
The implication of the ANOVA model for a
repeated measures design is that the correlation
between repeated measures is constant.
The multivariate model for a repeated
measures design
Let y1 , y2 , , yn denote a sample of n from the p-variate
normal distribution with mean vector m and covariance
matrix .
Here
 11  12


12
22




 1t  2t
 1t 

 2t 


 tt 
Allows for arbitrary correlation structure amongst the
repeated measures – yi1, yi2, … , yit
Test for equality of repeated
measures
Repeated measures equal
X
1
2
3
…
repeated measures
t
Let
Then
1 1 0 0
0 1 1 0

0 0 1 1
C 
p

 1 p
0 0 0 1


0 0 0 0
0
0
0
0
1
 Y1  Y2 
 Y1  

   Y2  Y3 
CY  C   


Yp  
  Y Y 
 p 1 p 
0
0 
0

0


1
The test for equality of repeated measures:
H 0 : C m  0 vs
H A : Cm  0
Consider the data Cy1 , Cy2 , , Cyn
This is a sample of n from the (t – 1)-variate normal
distribution with mean vector Cmx and covariance
matrix CC  .
Hotelling’s T2 test for equality of variables

T  n Cy  0
2

 CSC Cy  0
1
1

 n  Cx   CSC  Cx 
if H0 is true than
n  t 1
2
F
T
 t  1 n  1
has an F distribution with n1 = t – 1 and n2 = n - t + 1
Thus we reject H0 if F > Fa with n1 = p – 1 and
n2 = n – t + 1
To perform the test, compute differences of
successive variables for each case in the group and
perform the one-sample Hotelling’s T2 test for a
zero mean vector
Example
Example
In the following study the experimenter was
interested in how the level of a certain enzyme
changed in cardiac patients after open heart
surgery.
The enzyme was measured
• immediately after surgery (Day 0),
• one day (Day 1),
• two days (Day 2) and
• one week (Day 7) after surgery
for n = 15 cardiac surgical patients.
The data is given in the table below.
Table: The enzyme levels -immediately after surgery (Day
0), one day (Day 1),two days (Day 2) and one week (Day 7)
after surgery
Subject
1
2
3
4
5
6
7
8
Day 0 Day 1 Day 2 Day 7
108
63
45
42
112
75
56
52
114
75
51
46
129
87
69
69
115
71
52
54
122
80
68
68
105
71
52
54
117
77
54
61
Subject
9
10
11
12
13
14
15
Day 0 Day 1 Day 2 Day 7
106
65
49
49
110
70
46
47
120
85
60
62
118
78
51
56
110
65
46
47
132
92
73
63
127
90
73
68
Example :
(Repeated Measures Design - Grouping Factor)
• In the following study, similar to example 3,
the experimenter was interested in how the
level of a certain enzyme changed in cardiac
patients after open heart surgery.
• In addition the experimenter was interested in
how two drug treatments (A and B) would
also effect the level of the enzyme.
• The 24 patients were randomly divided into three
groups of n= 8 patients.
• The first group of patients were left untreated as a
control group while
• the second and third group were given drug
treatments A and B respectively.
• Again the enzyme was measured immediately after
surgery (Day 0), one day (Day 1), two days (Day 2)
and one week (Day 7) after surgery for each of the
cardiac surgical patients in the study.
Table: The enzyme levels - immediately after surgery (Day 0),
one day (Day 1),two days (Day 2) and one week (Day 7)
after surgery for three treatment groups (control, Drug A,
Drug B)
0
122
112
129
115
126
118
115
112
Control
Day
1
2
87
68
75
55
80
66
71
54
89
70
81
62
73
56
67
53
7
58
48
64
52
71
60
49
44
0
93
78
109
104
108
116
108
110
Group
Drug A
Day
1
2
56
36
51
33
73
58
75
57
71
57
76
58
64
54
80
63
7
37
34
49
60
65
58
47
62
0
86
100
122
101
112
106
90
110
Drug B
Day
1
2
46
30
67
50
97
80
58
45
78
67
74
54
59
43
76
64
7
31
50
72
43
66
54
38
58
• The subjects are grouped by treatment
– control,
– Drug A,
– Drug B
• There is one repeated measures factor Time – with levels
–
–
–
–
Day 0,
Day 1,
Day 2,
Day 7
Analysis