January,

It looks like you will need an interaction effect, perhaps
   g <- lm( response ~ subject + group*time)
Please see the ancova function in the HH package.
install.packages("HH") ## if necessary
library(HH)
?ancova

Rich




On Wed, Aug 10, 2011 at 5:15 AM, January Weiner <january.wei...@gmail.com>wrote:

> 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
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to