Professional Documents
Culture Documents
Nested Designs and Repeated Measures With Treatment and Time Effects
Nested Designs and Repeated Measures With Treatment and Time Effects
Factor A A1 A2 A3
Replicates Y111 Y112 Y121 Y122 Y211 Y212 Y221 Y222 Y311 Y312 Y321 Y322
0 j (i ) ~ N 0, 2 independent
a
A Fixed and B Random:
i 1
i j (i )
^ ^ ^ ^
Fitted Values: Y ijk = i j (i ) Y Y i Y Y ij Y i Y ij
^ a b n
SSE Yijk Y ij df E ab n 1
2
Residuals: eijk Yijk Y ijk Yijk Y ij
i 1 j 1 k 1
a
Factor A Sum of Squares: SSA bn Y i Y
2
df A a 1
i 1
a b
Factor B Within A Sum of Squares: SSB( A) n Y ij Y i df B ( A) a b 1
2
i 1 j 1
a b 1
E MSE 2 E MSE 2 E MSE 2
bn
s 2 Y i
MSE
bn
a
Contrasts among Means of A: ci 0
i 1
a a a
^ ^ MSE a 2
LA ci i ci i L A ci Y i s2 L A ci
i 1 i 1 i 1 bn i 1
MSE a 2
L A t 1 / 2 ; ab n 1
^
1 100% CI for LA : ci
bn i 1
a
a a 1
All Possible Comparisons among pairs of means of A: c
i 1
2
i 2 CA
2
2 MSE
Tukey: Y i Y i ' q 1 ; a, ab n 1
MSE
Bonferroni: Y i Y i ' t 1
; ab n 1
bn 2C A bn
MSB( A)
Factor B(A): H 0 : 1(1) ... b ( a ) 0 TS : FB ( A) RR : FB ( A) F 1 ; a b 1 , ab n 1
MSE
2
E Y ij ij i j (i )
Y ij
2
n
s 2 Y ij
MSE
n
b b 1
All Possible Comparisons among pairs of means of B within a given level (i ) of A: CB ( A)
2
2 MSE
Tukey: Y ij Y ij ' q 1 ; b, ab n 1
MSE
n
Bonferroni: Y ij Y ij ' t 1
2CB ( A)
; ab n 1
n
Mixed Effects Model (A Fixed and B Random)
MSA
Factor A: H 0 : 1 ... a 0 TS : FA RR : FA F 1 ; a 1, a b 1
MSB( A)
2 n 2 ( )
E Y i i i
Y i
2
bn
MSB( A)
bn
s 2 Y i
a
a a 1
All Possible Comparisons among pairs of means of A: ci2 2 C A
i 1 2
2MSB( A)
Tukey: Y i Y i ' q 1 ; a, a b 1
MSB( A)
Bonferroni: Y i Y i ' t 1 ; a b 1
bn 2C A bn
MSB( A)
Factor B(A): H 0 : 2 ( ) 0 TS : FB ( A) RR : FB ( A) F 1 ; a b 1 , ab n 1
MSE
1 1
E MSB( A) 2 n 2 ( ) E MSE 2 E MSB ( A) E MSE ( )
2
n n
s
2 2
1 1 ( )
s2 ( ) MSB ( A) MSE Approximate df (Satterthwaite): df ( )
n n MSB( A) 2 MSE 2
n n
a b 1 ab n 1
df ( ) s2 ( ) df ( ) s ( )
2
E MSA 2 n 2 ( ) bn 2 E MSB ( A) 2 n 2 ( )
1 1
E MSA) E MSB( A)
2
bn bn
s2
2
1 1
s2 MSA MSB ( A) Approximate df (Satterthwaite): df A
bn bn MSA 2 MSB( A) 2
bn bn
a 1 a b 1
df A s2 df A s2
Approximate 1 100% CI For :
2
,
2 1 ; df
2 ; df A
2 A
2
Factor B Within A is same as in Mixed Effects Model
Repeated Measures with Treatment and Time
Goal: Compare a Treatments over b Time Points
Begin with nT = as Subjects, and randomly assign them
such that s Subjects receive Treatment 1, ... s
Subjects receive Treatment a
Each Subject receives 1 Treatment (not all Treatments)
Each Subject is observed at b Time points
Treatment is referred to as Between Subjects Factor
Time is referred to as Within Subjects Factor
Treatment and Time are typically Fixed Factors
Subject (Nested within Treatment) is Random Factor
Generalizes to more than 1 Treatment Factor
Statistical Model
Yijk i ( j ) j k jk ijk i 1,..., s; j 1,..., a; k 1,..., b
Yijk Measurement on i th Subject within the i th Treatment at the k th Time Point
Overall Mean ijk ~ N 0, 2 independent
i ( j ) Subject Effects i ( j ) ~ N 0, 2 independent
i( j) ijk
a
j Treatment Effects j 1
j 0
b
k Time Effects
k 1
k 0
a b
jk TreatmentxTime Interaction Effects
j 1
jk
jk 0
k 1
Yijk ~ N j k jk , 2 2
Yijb 2 2
2 2
Analysis of Variance & F-Tests
a
sb 2j
a
Treatment (Factor A): SSA sb Y j Y E MSA 2 b 2
2
j 1
df A a 1
j 1 a 1
b
sa k2
b
SSB sa Y k Y E MSB 2
2
Time (Factor B): df B b 1 k 1
k 1 b 1
a b
s jk
2
a b
SSAB s Y jk Y j Y k Y df AB a 1 b 1 E MSAB 2
2
j 1 k 1
Trt x Time (AB):
j 1 k 1 a 1 b 1
s a
Subject(Trt) (S(A)): SSS ( A) b Y ij Y j df S ( A) a s 1 E MSS ( A) 2 b 2
2
i 1 j 1
s a b
TimexSubj(Trt) (B.S(A)): SSB.S ( A) Y ijk Y ij Y jk Y j df B.S ( A) a b 1 s 1 E MSB.S ( A) 2
2
i 1 j 1 k 1
Rejection Regions: F F 1 ; a 1, a s 1 F F 1 ; b 1, a b 1 s 1 F F 1 ; a 1 b 1 , a b 1 s 1
A B AB
Comparing Treatment and Time Effects No Interaction
Treatment (Factor A) Effects when No Interaction Between Treatment and Time:
Tukey Method: Y j Y j ' q 1 ; a s 1
MSS ( A)
sb
Bonferroni Method:
2MSS ( A) a (a 1)
Y j Y j ' t 1 ; a s 1 CA
2C A sb 2
Tukey Method: Y k Y k ' q 1 ; a b 1 s 1
MSB.S ( A)
sa
Bonferroni Method:
2MSB.S ( A) b(b 1)
Y k Y k ' t 1 ; a b 1 s 1 CB
2CB sa 2
Comparing Trt Levels w/in Time Periods
Comparing Treatment Levels Within Time Levels:
Bonferroni:
2 MSS ( A) b 1 MSB.S ( A)
Y . jk Y . j ' k t 1 ; df
2C A bs
with approximate df:
(b 1) MSB.S ( A) MSS ( A)
2
df
(b 1) MSB.S ( A) 2 MSS ( A) 2
a(b 1)( s 1) a( s 1)