Dear all,

I was trying to do some contrasts within ANOVA. I searched the archive and
found a clue posted by Steffen Katzner
( http://tolstoy.newcastle.edu.au/R/help/06/01/19385.html)

I have three levels for a factor names "StdLot". I just want to make three
comparisons, 1 vs 2, 1 vs 3 and 2 vs 3.

First,
contrasts(d3$StdLot,3)<-matrix(c(1,-1, 0,0,1,-1,1,0,-1),3,3)   #d3 is the
data set. set up the contrast matrix

Second,
aov(Bkg~StdLot,na.rm=T,data=d3,contrasts=contrasts(d3$StdLot))->mod.aov
#ANOVA,

Finally,
summary(mod.aov,split=list(StdLot=list('1 vs 2'=1,'2 vs 3'=2,'1 vs 3'=3)))
#comparison summary

Here is the final result I got, the third comparison is missing. Does anyone
have any idea what is wrong here? If I change the order of the comparisons
it's always the third one missing.  So I guess it's not due to the data.
Appreciate any comment.

                  Df Sum Sq Mean Sq F value    Pr(>F)
StdLot             2  1.905   0.953 10.3769 3.710e-05 ***
  StdLot: 1 vs 2   1  0.223   0.223  2.4239    0.1200
  StdLot: 2 vs 3   1  1.683   1.683 18.3299 2.162e-05 ***
  StdLot: 1 vs 3   1
Residuals        601 55.173   0.092
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
2 observations deleted due to missingness


-- 
Jun Shen PhD
PK/PD Scientist
BioPharma Services
Millipore Corporation
15 Research Park Dr.
St Charles, MO 63304
Direct: 636-720-1589

	[[alternative HTML version deleted]]


