Download 1. Treatment group changing over time 2. Crossover designs 3. The

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Lecture 19
1. Treatment group changing over time
2. Crossover designs
3. The 2 x 2 crossover: Wine Study Example
4. Modeling fixed effects: treatment, period, carryover
5. Planning crossover designs with R: crossdes
1
Air filtration in swine barns
Retrospective study of effects of barn air filtration on reproduction rate in swine
(C. Alonso).
• 21 farms in southern Minnesota or northern Iowa
• Quarterly data (every 3 months) for almost 7 years from each farm
• response: farrowing percent = percent of mated sows that gave birth to a litter
• 12 farms installed filtration during study period; 8 did not
All 21 farms start in control group (no filtration); 12 switch to filtration group
during study. Filtration status varies over time.
2
quarter
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Farm_ID
15
15
15
15
15
15
15
15
15
15
15
15
15
15
15
15
15
15
15
Farr_pct
82.34
71.08
71.20
84.45
82.00
77.26
79.78
86.11
86.07
85.26
86.91
89.37
87.73
90.52
88.38
91.65
88.83
92.62
89.70
filter_
days
0
0
0
0
0
0
0
0
0
0
0
0
32
92
90
91
92
92
90
nearby_
farms
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
cold_
weather
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
Outbreaks
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
Farm 15 records start in quarter 9, filtration began during quarter 21.
Should quarter 15 (with 32/90 days) be included in control or filtration group?
3
Drop quarters where filtration started between day 10 and day 80 of quarter.
data swine1;
set swine0;
filtration = (filtration_days > 80.);
if (0 < filtration_days LE 10) then filtration=0;
if (10 < filtration_days LE 80) then filtration=.;
4
Study design over time: black = control, red = filtration
red dot = transition quarter (omitted)
20
Farm ID
15
10
5
0
5
10
15
20
Study Quarter
5
Longitudinal plot of farrowing percent, by filtration status:
6
25
Longitudinal plot of farrowing percent:
proc SGpanel data=swine1 noautolegend;
panelby filtration / columns=1;
series x=quarter y=farrow_pct
/ group=farm_id lineattrs= (pattern=1 color="black") ;
7
When we look at correlation within farms from quarter to quarter, we should look
at the control quarters separately from filtration quarters because we expect there
may be a shift when a farm starts filtration.
data control;
set pubh.alonso1;
if filtration = 0;
proc sort data=control;
by farm_id quarter;
Proc Transpose data=control out=wide prefix =qtr_ ;
ID quarter;
* values become names of variables in output data;
VAR farrow_pct; * repeated measurements (will be transposed);
BY farm_id;
* subject identifier: one obs for each level of BY variable(s);
proc print data=wide;
where farm_id = 15;
proc corr data=wide outp=qtr_corr;
var qtr_1 - qtr_27;
8
Large number of correlations (27*26/2 = 351), most look small, varying from
positive to negative
9
10
11
Model repeated measures (quarters) within farms, using compound symmetry
assumption (equal correlations).
Proc Mixed data= pubh.alonso1;
class filtration quarter farm_id;
*
model farrow_pct
= filtration quarter filtration*quarter;
check interaction model first
model farrow_pct
= filtration quarter;
repeated quarter / subject =farm_id type = CS;
lsmeans filtration / diff;
After checking that interaction term is not significant, fit main effects model.
Could add adjustors such as number of nearby farms, virus outbreaks, etc.
12
Effect
filtration
quarter
Num
DF
1
26
Den
DF
12
445
F Value
5.97
3.47
Pr > F
0.0309
<.0001
Least Squares Means
Effect
filtration
filtration
filtration
0
1
Standard
Error
0.3771
0.7366
Estimate
84.0882
85.9120
DF
12
12
t Value
222.98
116.63
Pr > |t|
<.0001
<.0001
Differences of Least Squares Means
Effect
filtration
filtration
0
_filtration
1
Estimate
-1.8238
Standard
Error
0.7461
DF
12
t Value
-2.44
Pr > |t|
0.0309
Mean farrowing percent without filtration was 84± 0.4% (SE), and was 1.8 ± 0.7%
higher after starting filtration (p = .031).
13
Crossover Designs
In a crossover design, subjects get all the treatments in sequence:
they cross over from one treatment to another.
Advantages: treatments are compared within the same person, which can greatly
reduce error variance:
variability between subjects is eliminated from comparison
“Each subject serves as their own control.”
14
Disadvantages:
repeated measurements from each subject means correlated observations
complicated designs are more sensitive to errors in treatment assignment and to
missing values.
Carryover : effect of treatment A may persist during next treatment B
Jones and Kenward (2003) Design and Analysis of Cross-Over Trials, 2nd Edition.
15
2 x 2 Crossover Example: Wine Study
Trial to study effects of moderate consumption of wine in adults with diabetes
(Metabolism Clinical and Experimental, 2008; 57: 241–245.)
Subjects: 17 adults with type 2 diabetes
Treatments: no alcohol for a month (A = abstinence treatment);
one glass of wine with dinner each evening for a month (W = wine treatment).
Outcome:: insulin (fasting serum insulin), measured at the end of each month.
9 participants randomly assigned to sequence AW, 8 to WA.
16
Time interval for treatment is period.
2 periods and 2 treatments give only 2 sequences: AW and WA.
Assign equal numbers to each sequence at random.
Compare demographics and baseline values between sequence groups.
If no problems, summary is treatment means ± SE
17
Data from the first 6 participants:
Obs
Subject
month
Wine
sequence
1
CK
1
0
AW
6
2
CK
2
1
AW
6
3
DH
2
0
WA
10
4
DH
1
1
WA
8
5
DP
1
0
AW
24
6
DP
2
1
AW
16
7
DS
2
0
WA
20
8
DS
1
1
WA
16
9
DS2
2
0
WA
14
10
DS2
1
1
WA
16
11
EM
1
0
AW
14
12
EM
2
1
AW
16
18
Insulin
Make longitudinal plots by treatment and by time
Proc SGplot noautolegend
data=ph6470.wine;
suppress legend
series x=wine y=insulin /
group=subject LINEATTRS= (pattern=1 color="black");
Proc SGplot noautolegend data=ph6470.wine;
series x=month y=insulin /
group=subject LINEATTRS= (pattern=1 color="black");
19
What do we hope to see here?
20
What do we hope to see here?
21
Demographic table
Demographic table reports baseline characteristics (age, gender, weight, etc.) of
study subjects.
Usually compare treatment groups at baseline, to show randomization worked.
Here, everyone gets all treatments, so everyone is in all the treatment groups.
Report and compare sequence groups:
Random assignment to the two sequences, AW and WA, should result in similar
characteristics.
22
Model for mean fixed effects
Fixed effects in crossover designs:
• t j is the effect of treatment j
• p i is the effect of period i (which is month i in this study)
• c j is the carryover effect from treatment j : any persisting effects during
period 2 from treatment j in period 1
Mean fixed effects:
Sequence
Period 1
Period 2
AW
t A + p1
tW + p 2 + c A
WA
tW + p 1
t A + p 2 + cW
23
Why not a paired t-test?
Each person gets both treatments. How about basing analysis on within-person
differences between treatments?
Paired t-test uses the differences
d k = (response to W) ° (response to A)
for each subject k.
±
Test statistic is d¯ SE(d¯).
24
Assume each subject gets mean outcome:
Sequence Number
Period 1
Period 2
Mean Difference W ° A
AW
n AW
t A + p1
tW + p 2 + c A
tW ° t A + p 2 ° p 1 + c A
WA
nW A
tW + p 1
t A + p 2 + cW
tW ° t A ° p 2 + p 1 ° cW
Want mean of d¯ = tW ° t A
Sum the last column for all (n AW + nW A ) subjects and divide to get d¯:
(n AW + nW A )(tW ° t A ) + n AW (p 2 ° p 1) + n AW c A + nW A (p 1 ° p 2) ° nW A cW
d¯ =
n AW + nW A
25
Working with mean values:
(n AW + nW A )(tW ° t A ) + n AW (p 2 ° p 1) + n AW c A + nW A (p 1 ° p 2) ° nW A cW
d¯ =
n AW + nW A
tW ° t A +
n AW (p 2 ° p 1) ° nW A (p 2 ° p 1) + n AW c A ° nW A cW
n AW + nW A
= tW ° t A +
(n AW ° nW A )(p 2 ° p 1) n AW c A ° nW A cW
+
n AW + nW A
n AW + nW A
We want mean of d¯ = tW ° t A , so we want the two other terms to be zero.
If we don’t allocate subjects so that n AW = nW A then second term may not be zero.
If we do, but carryover from each treatment is different, c A 6= cW , then third term
may not be zero.
26
If the design is badly unbalanced or if 2 carryover effects differ, then d¯ is biased
and the paired t-test is not valid.
How do you prevent unbalanced design?
Check carryover effects before comparing treatment effects.
27
Longitudinal model for crossover
Model correlation within subjects with a random intercept.
mixed-effects model for the response from subject k in sequence i at month j :
°
¢
y i j k = Ø 0 + b k + t j + p i + c i 0 + "i j k ,
• Ø0 = overall (mean) intercept,
• b k = random intercept for subject k, with Normal(0, æ2b ) distribution,
• t j = effect of the treatment j (wine),
• p i = effect of period i (month),
• c i 0 = carryover effect of the treatment in the preceding period (sequence),
• and the errors "i j k are independent Normal(0, æ2e ), and independent of random
effects {b k }.
28
Proc Mixed
data=wine;
class sequence subject month wine;
model
insulin
=
wine month sequence
/ solution ddfm=kenwardroger;
random intercept
recommended for crossover
/ subject = subject
v vcorr ;
lsmeans wine / diff;
wine is treatment effect
month is period effect
sequence is carryover effect
29
We get a 2£2 correlation matrix for the two responses from a subject:
Estimated V Correlation
Matrix for Subject CK
Row
Col1
Col2
1
1.0000
0.9187
2
0.9187
1.0000
Within-subject correlation estimate r = .92
Crossover design really improved efficiency.
30
Type 3 Tests of Fixed Effects
Effect
sequence
month
wine
Num
DF
1
1
1
Den
DF
15
15
15
F Value
0.35
0.17
6.20
Pr > F
0.5614
0.6885
0.0250
F-test for sequence is test for c A = cW (equal carryover effects).
F-test for month is test for p 1 = p 2 (equal period effects).
F-test for wine is test for t A = tW , comparing treatments adjusted for carryover
and period effects.
In the 2£2 crossover design, sequence is confounded with both treatment£period
interaction and carryover. So only one test to check all three.
31
Main comparison between treatments
lsmeans wine / diff ;
Least Squares Means
Effect
Wine
Wine
Wine
0
1
Estimate
17.4028
14.6111
Standard
Error
2.7812
2.7812
DF
15
15
t Value
6.26
5.25
Pr > |t|
<.0001
<.0001
Differences of Least Squares Means
Effect
Wine
Wine
0
Wine
1
Estimate
2.7917
Standard
Error
1.1213
The wine increased insulin by 2.8 ± 1 on average.
32
DF
15
t Value
2.49
Pr > |t|
0.0250
Planning a crossover study
Balance for first-order carryover effects. Check that
• Each treatment is given the same number of times
• Each treatment is given first the same number of times, second the same
number of times, etc.
• For any two treatments, T j directly follows Tk the same number of times Tk
directly follows T j
Randomization for a crossover study:
Select a set of treatment sequences that satisfy these criteria.
Randomly assign equal numbers of participants to each sequence.
33
2 treatments: AB or BA
3 treatments: 3 £ 2 £ 1 = 6 different sequences
4 treatments: 4 £ 3 £ 3 £ 2 £ 1 = 24 different sequences
5 treatments: 120 sequences
Assigning equal numbers to every sequence usually requires a large sample.
Choose a subset of sequences that satisfy the design criteria. Common approaches:
• mutually orthogonal Latin squares
• Williams design: use the minimum number of sequences to give balance, with
each treatment following all others.
34
A latin square is an an n £ n table filled with n treatments so that that each
treatments appears exactly once in each row and exactly once in each column.
Here is a 4 £ 4 latin square:
[,1] [,2] [,3] [,4]
[1,]
1
2
3
4
[2,]
2
1
4
3
[3,]
3
4
1
2
[4,]
4
3
2
1
Which treatments does 2 precede and follow? Balanced for carryover?
Mutually orthogonal latin squares: if any two of them are superimposed, the
resulting array will contain each ordered pair of treatments (i , j ) exactly once.
35
R package crossdes gives Williams designs or mutually orthogonal latin squares.
R is free open-source statistical software that runs on Macs, PCs, Linux, Unix.
http://www.R-project.org Install R, then install crosdes
36
Suppose 4 treatments, 4 periods.
> get.plan ( trt=4,k=4,
random=F )
Possible constructions and minimum numbers of subjects:
1
2
3
all.combin williams des.MOLS
24
4
12
block size
Method:
Number:
Please choose one of the following constructions
1: all.combin
2: williams
3: des.MOLS
4: Exit
Selection: 2
des.MOLS selected. How many ’replicates’ do you wish (1 - 1 )?
Selection: 1
37
We can recruit 12 subjects:
Rows represent subjects, columns represent periods.
[1,]
[2,]
[3,]
[4,]
[,1] [,2] [,3] [,4]
1
2
3
4
2
1
4
3
3
4
1
2
4
3
2
1
[5,]
[6,]
[7,]
[8,]
1
2
3
4
3
4
1
2
4
3
2
1
2
1
4
3
[9,]
[10,]
[11,]
[12,]
1
2
3
4
4
3
2
1
2
1
4
3
3
4
1
2
Mutually orthogonal latin squares, use 12 different sequences—one for each
subject. One missing value or dropped subject unbalances the design.
38
However, the Williams design uses only 4 sequences:
Rows represent subjects, columns represent periods.
[,1] [,2] [,3] [,4]
[1,]
1
2
4
3
[2,]
2
3
1
4
[3,]
3
4
2
1
[4,]
4
1
3
2
Which treatments does 2 precede and follow?
Randomly assign 3 subjects to each sequence. This is more robust to drop-outs or
missing values.
39