Tukey Test for Additivity

advertisement
Tukey Test for Additivity
If we believe interaction is a problem, this is a possible way to test it without using up all our df.
One additional term is added to the model ( θ ) , replacing the ( αβ )ij with the product θα iβ j :
µij = µ + α i + β j + θα iβ j
We use one degree of freedom to estimate θ, leaving two left to estimate error (in the terminals
example). Of course, this only tests for interaction of the specified form, but it may be better
than nothing.
Using SAS for Tukey’s test for additivity: Terminal Example.
Find µ̂ (grand mean)
proc glm data=terminals;
model usage=;
output out=overall p=muhat;
proc print data=overall;run;
Obs
1
2
3
4
5
6
7
8
usage
16.5
11.8
12.3
16.6
21.4
17.3
16.9
21.0
location
1
2
3
4
1
2
3
4
time
Midterm
Midterm
Midterm
Midterm
Final
Final
Final
Final
muhat
16.725
16.725
16.725
16.725
16.725
16.725
16.725
16.725
Find µ̂ A (treatment means)
proc glm data=terminals;
class location;
model usage=location;
output out=meanA p=muhatA;
proc print data=meanA;run;
Obs
1
2
3
4
5
6
7
8
usage
16.5
11.8
12.3
16.6
21.4
17.3
16.9
21.0
location
1
2
3
4
1
2
3
4
time
Midterm
Midterm
Midterm
Midterm
Final
Final
Final
Final
A
18.95
14.55
14.60
18.80
18.95
14.55
14.60
18.80
Find µ̂ B (treatment means)
proc glm data=terminals;
class time;
model usage=time;
output out=meanB p=muhatB;
proc print data=meanB;run;
Obs
1
2
3
4
5
6
7
8
usage
16.5
11.8
12.3
16.6
21.4
17.3
16.9
21.0
location
1
2
3
4
1
2
3
4
time
Midterm
Midterm
Midterm
Midterm
Final
Final
Final
Final
muhat
B
14.30
14.30
14.30
14.30
19.15
19.15
19.15
19.15
Combine and compute
data estimates;
merge overall meanA meanB;
alpha = muhatA - muhat;
beta = muhatB - muhat;
atimesb = alpha*beta;
proc print data=estimates;
var location time alpha beta atimesb; run;
Obs
1
2
3
4
5
6
7
8
location
1
2
3
4
1
2
3
4
time
Midterm
Midterm
Midterm
Midterm
Final
Final
Final
Final
alpha
2.225
-2.175
-2.125
2.075
2.225
-2.175
-2.125
2.075
beta
-2.425
-2.425
-2.425
-2.425
2.425
2.425
2.425
2.425
atimesb
-5.39562
5.27437
5.15312
-5.03188
5.39563
-5.27437
-5.15312
5.03188
Run GLM
proc glm data=estimates;
class location time;
model usage=location time atimesb; run;
Source
location
time
atimesb
Error
Corrected Total
DF
3
1
1
2
7
Sum of
Squares
37.00500000
47.04500000
0.07855763
0.26644237
84.39500000
Mean Square
12.33500000
47.04500000
0.07855763
0.13322119
F Value
92.59
353.13
0.59
Pr > F
0.0107
0.0028
0.5228
The test for atimesb is testing H0: θ = 0, which is not rejected. According to this, the interaction
is not significant.
Compare to original analysis (Additive model):
Source
location
time
Error
Corrected Total
DF
3
1
3
7
Squares
37.00500000
47.04500000
0.34500000
84.39500000
Mean Square
12.33500000
47.04500000
0.11500000
F Value
107.26
409.09
Pr > F
0.0015
0.0003
Notice the p-values on the main effect tests changed, because we used up an extra error df when
conducting Tukey’s additivity test.
Download