Вы находитесь на странице: 1из 20

Lecture 28

Additive Models
STAT 512
Spring 2011
Background Reading
KNNL: 19.1, Chapter 20

28-1

Topic Overview
Additive Two-way ANOVA Model
Two-way ANOVA with n = 1

28-2

Additive Models
In an additive model, interaction terms are
assumed to be zero:
Yijk = + i + j + ijk

where ijk ~ N (0,

) are independent

and i = i = 0
SAS uses as constraints: a = 0, b = 0 , so
compares factor level means to last level of
A and B.
28-3

Additive Models (2)


You must assume an additive model when
only one case per treatment combination.
Example: Factor A has 3 levels, Factor B
has 4 levels, one observation per cell.
SOURCE
A
B
AB=Error
Total

DF
2
3
6
11

28-4

Additive Model (3)


Can also be used to revise the model after
interaction tests insignificant.
See section 19.10. This is called pooling as
the SSAB is pooled back into the SSE.
Sometimes pooling is not useful at all. But
other times it may be useful to reduce
(overestimated) MSE is if SSAB is small
but uses several degrees of freedom.
28-5

Castle Bakery Example


Originally, we had the ANOVA table below.
Source
DF
height
2
width
1
height*width 2
Error
6
Total
11

SS
1544
12
24
62
1642

MS F Value
772
74.71
12
1.16
12
1.16
10.3

Pr > F
<.0001
0.3226
0.3747

28-6

Castle Bakery Example (2)


Note that we have only 6 DF for error, and 2 DF
are used up on the interaction term. What
happens to MSE if we pool?
SSE pooled = SSE + SSAB
= 62 + 24 = 86

DFpooled = 6 + 2 = 8
MSE pooled = 86 / 8 = 10.75

In this case, no help. MSE actually got larger.


28-7

Another Pooling Example

4 levels of A
4 levels of B
2 observations per cell
ANOVA table with interaction

Source
A
B
A*B
Error
Total

DF
3
3
9
16
31

SS
900
300
90
600
1890

MS
300
100
10
37.5

F Value
8.0
2.7
0.3

28-8

Another Pooling Example (2)


Interaction is not close to significant, and 9
degrees of freedom are being spent there.
If we pool that back into the error....
Source
A
B
Error
Total

DF
3
3
25
31

SS
900
300
690
1890

MS
300
100
27.6

F Value
10.9
3.6

So we had overestimated the MSE, which


changes the F-values
28-9

Pooling Summary
Pooling affects both the significance level
and power of the tests for the main effects and
is not fully understood.
Suggested rules for when to pool:
o Degrees of freedom associated with MSE
are small
o The test statistic MSAB/MSE very small
compared to the critical value (i.e., the pvalue for the interaction effect fairly large)
28-10

ANOVA for n = 1
Weve seen that interaction cannot be tested
for normally as there would be no degrees
of freedom remaining for error.
So for n = 1 we must assume additivity.
 How would we check this assumption?
The rest of the analysis is virtually the same
as before except that we are only looking at
main effects.
28-11

Example
Problem 20.2 (terminals.sas)
University conducted experiment to see the
usage levels of coin-operated computer
graphics terminals
Two testing periods (during midterm week
and during finals week) at four different
locations.
Only one observation per cell, but no reason
to expect an interaction here.
28-12

Data
Loc #1

Loc. #2

Loc. #3

Loc. #4

Midterm

16.5

11.8

12.3

16.6

Final

21.4

17.3

16.9

21.0

28-13

Interaction Plot

28-14

Additive Model
Based on interaction plot, additive model
seems appropriate. Should of course also
check other assumptions (normality,
constant variance, etc.)
Source
loc
time
Error
Total

DF
SS
3 37.005
1 47.045
3
0.345
7 84.395

MS
F Value
12.335 107.26
47.045 409.09
0.115

Pr > F
0.0015
0.0003

28-15

Additive Model (2)


Both main effects are significant, so analyze
them via comparisons of means.
Again, complete balance, looking at main
effects only, so MEANS and LSMEANS
give the same results
You could run the SAS code and compare
the output for these on your own.

28-16

LSMeans Output
location
1
2
3
4
i
1
1
1
2
2
3

j
2
3
4
3
4
4

usage LSMEAN
18.9500000
14.5500000
14.6000000
18.8000000
DIFF
4.40
4.35
0.15
-0.05
-4.25
-4.20

LSMean #
1
2
3
4

95% CI DIFF
2.763536
6.036464
2.713536
5.986464
-1.486464
1.786464
-1.686464
1.586464
-5.886464
-2.613536
-5.836464
-2.563536
28-17

LSMeans Output
Confidence intervals for (1,4) and (2,3)
contain zero.
Terminals 1 and 4 are used more often than
terminals 2 and 3.
time
Final
Midterm

usage LSMEAN
19.1500000
14.3000000

Pr > |t|
0.0003

Usage during the final is significantly


greater than it is at midterm.
28-18

Tukeys Test for Additivity


In addition to constructing the interaction plot,
it is possible to test for a special type of
interaction
Model: Yij = + i + j + i j + ij
Test: H 0 : = 0 vs. H A : 0
Requires 1 (numerator) df, leaving (a-1)(b-1)1=ab-a-b df left for the error (denominator)
Cant directly obtain from SAS, but can create
special interaction term and test by including it
in model.
28-19

Upcoming in Lecture 29...


Randomized Complete Block Design
Unequal Sample Sizes

28-20

Вам также может понравиться