[R] how to run ANCOVA?
Sasha Wolosin
sasha.wolosin at gmail.com
Tue Aug 22 22:59:22 CEST 2006
Dear all,
I would like to know how to run an analysis of covariance in R. For
example, I have a data frame ("data") consisting of two second-degree
categorical variables ("diagnosis" and "gender"), one continous
independent variable ("age") and one continous dependent variable
("response").
I ran a simple anova to see the effects of diagnosis and gender (and
interaction):
aov.out <- aov(response~diagnosis*gender,data)
anova(aov.out)
Now I would like to covary for age, how can I add "age" as a covariate
to this equation?
Thanks,
Sasha
More information about the R-help
mailing list