Hi,

I am comparing three treatments. The data come from a longitudinal study,
and for each treatment I have only 1 case, on which the observations across
20 years are made. My main aim is to compare the three treatments, but the
effect of time is of interest as well. Which of the many R functions should
I use for that purpose?

I applied the aov function and received this:

-------------------------------------------------------------
Call:
aov(formula = Y ~ Treatment + Year + Error(Treatment/Year))

Grand Mean: 0.5690324
Stratum 1: Y
Terms:
                       Treatment
Sum of Squares  0.01410447
Deg. of Freedom          2
Estimated effects may be unbalanced

Stratum 2: Treatment:Year
Terms:
                     Year Residuals
Sum of Squares  0.8082173 0.3400290
Deg. of Freedom        20        40

Residual standard error: 0.09219938
Estimated effects may be unbalanced
----------------------------------------------------------------------------

Summary(fit) gives p-value for year, but not for Treatment:

Error: SIS
    Df    Sum Sq   Mean Sq
SIS  2 0.0141045 0.0070522

Error: SIS:Year
          Df  Sum Sq Mean Sq F value    Pr(>F)
Year      20 0.80822 0.04041  4.7538 1.384e-05 ***
Residuals 40 0.34003 0.00850

Am I doing something wrong? Or any other function should work better here?

(I am using 2.7.2 R under Windows XP.)

Many thanks,
Wolf

	[[alternative HTML version deleted]]


