Skip to content
Prev 7058 / 20628 Next

ANCOVA with repeated measures

Ricardo Solar <rrsolar at ...> writes:
You haven't given us very much detail nor told us what you've tried
so far, but I will suppose that you have a data frame D
containing a normally distributed response
variable y, a covariate x, a fragment factor f, and a year variable
(factor) t (I will assume there is a single value of y measured
per fragment per year.  Then the standard way to deal with this would be

  lme(y~x*t,random=~1|f,data=D)

or

  lmer(y~x*t+(1|f),data=D)

  You should treat year (t) as a fixed rather than a random effect
because it won't be practical to estimate the variance of a random
effect with only three levels.

  Ben Bolker