[R] 2^2 problem revisited

Edna Bell edna.bell01 at gmail.com
Thu Nov 13 22:44:17 CET 2008


Dear R gurus:

Here is the following from Montgomery's Design and Analysis of
Experiments, 5th edition.

> str(rout1.df)
'data.frame':   16 obs. of  3 variables:
 $ resp: num  18.2 18.9 12.9 14.4 27.2 24 22.4 22.5 15.9 14.5 ...
 $ A   : Factor w/ 2 levels "-1","1": 1 1 1 1 2 2 2 2 1 1 ...
 $ B   : Factor w/ 2 levels "-1","1": 1 1 1 1 1 1 1 1 2 2 ...
> rout1.df
   resp  A  B
1  18.2 -1 -1
2  18.9 -1 -1
3  12.9 -1 -1
4  14.4 -1 -1
5  27.2  1 -1
6  24.0  1 -1
7  22.4  1 -1
8  22.5  1 -1
9  15.9 -1  1
10 14.5 -1  1
11 15.1 -1  1
12 14.2 -1  1
13 41.0  1  1
14 43.9  1  1
15 36.3  1  1
16 39.9  1  1
> rout1.aov <- aov(resp~A*B,data=rout1.df)
> summary(rout1.aov)
            Df  Sum Sq Mean Sq F value    Pr(>F)
A            1 1107.23 1107.23 185.252 1.175e-08 ***
B            1  227.26  227.26  38.023 4.826e-05 ***
A:B          1  303.63  303.63  50.801 1.201e-05 ***
Residuals   12   71.72    5.98
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>

When you test on interaction, you reject (of course).

Now, I thought that you could not test on the main effects, A and B.
Is that true, please?

Thanks,
Edna Bell



More information about the R-help mailing list