[R] Using ANCOVA in R

January Weiner january.weiner at gmail.com
Wed Aug 10 11:15:38 CEST 2011


Hello,

I have a problem with using the following design with ANCOVA in R.

There are two groups (control + treatment), each with ten subjects.
The subjects show a response that is monitored over time (four time
points). For a single given subject, the response can be analysed with
linear regression with time as the independent variable.

The question is, how does the response differ between the two groups.
It is to be expected that the slope of the response differs between
the two groups, while the intercept itself is of minor interest.

I have tried a linear model as in

g <- lm( response ~ time + subject + group)

but somehow I think that this is not correct, as it would not show a
difference in the slope of the response.

Any kind of help would be greatly appreciated.

--
January



More information about the R-help mailing list