[R] Adjusted Means

John Fox jfox at mcmaster.ca
Mon Oct 17 22:29:23 CEST 2011


Dear Mattune,

I guess that you're using the effect() function in the effects package.
You've requested the effect for the covariate fixing the values of the
factors, rather than vice-versa. Try effect("a*b*c", Anocova.Model) or, for
more detail in the output, summary(effect("a*b*c", Anocova.Model)). I
assume, BTW, that you fit the model X ~ a*b*c + d, with d the covariate,
rather than what you said you did.

I hope this helps,
 John

--------------------------------
John Fox
Senator William McMaster
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox




> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of Mattune
> Sent: October-17-11 3:45 PM
> To: r-help at r-project.org
> Subject: [R] Adjusted Means
> 
> I'm running the following ANCOVA model in R: X=a*b*d + d where d is the
> covariate.  I want to produce adjusted means for X for all possible
treatment
> combinations.  a has 6 levels, b has 2 levels, c has 2 levels, so this is
a
> 6x2x2 = 24 possible treatment combinations.  When I run:
> effect("d", Ancova.Model) I am given only 20 adjusted means (also, I'm not
> exactly sure of how the adjusted means are reported, that is, which one
> represents which treatment combination...what order are they in?)  Any
> ideas??
> 
> Thanks!
> Master's Student in Maine
> 
> --
> View this message in context:
http://r.789695.n4.nabble.com/Adjusted-Means-
> tp3913159p3913159.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list