[R] post hoc comparison in repeated measure

array chip arrayprofile at yahoo.com
Tue May 9 19:26:38 CEST 2006

Hi, I have a simple dataset with repeated measures.
one factor is treatment with 3 levels (treatment1,
treatment2 and control), the other factor is time (15
time points). Each treatment group has 10 subjects
with each followed up at each time points, the
response variable is numeric, serum protein amount. So
the between subject factor is treatment, and the
within subject factor is time. I ran a 2-way ANOVA
with repeated measures considering time as the within
subject factor:

The results told me that the treatment is marginally
significant (p=0.04). I would like to know where that
significance came from, so I did ALL pairwise t tests
(treat1 vs. control, treat2 vs. control, treat1 vs.
treat2) at each of the time point. There are 2 ways I
can do these t tests, using the MSE from the ANOVA
(the MSE used for the treatement effect in the ANOVA,
i.e. the treatment by time interaction) as the t test
error, or simply ran ordinary t tests using only the
data of the treatment levels in comparison. What I
found is that using the first approach, I couldn't
find any pairwise comparison statistically significant
which I thought I should find at least one
significant, because the ANOVA treatment effect is
mariginally significant (p = 0.04). Using the second
approach, I did find some pariwise comparisons
significant. Can anyone explain to me why?

BTW, is there a R function that can do post hoc
comparison on repeated measure ANOVA (from avo() with
Error term)?

More information about the R-help mailing list