[R] Ancova

John Fox jfox at mcmaster.ca
Sat Jan 31 01:10:48 CET 2009


Dear Patrick,

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of Patrick B é dard
> Sent: January-30-09 6:31 PM
> To: r-help at r-project.org
> Subject: [R] Ancova
> 
> Hello,
> 
> I have the following ancova:
> my_ancova = aov(x~a+b)
> 
> How do I obtain the means of b once the covariate a has been removed?

One way is to use the function effect() in the effects package:

   effect("b", my_ancova)

which will give you the adjusted means for x at the levels of b with a set
to its overall mean.

I hope this helps,
 John

> 
> thanks
> 
> __________________
> Patrick Bidard Ph.D.
> Dept. of Neuroscience
> Brown University
> 
> 
> 
> 	[[alternative HTML version deleted]]




More information about the R-help mailing list