[R] manova question

John Fox jfox at mcmaster.ca
Mon Mar 21 01:29:41 CET 2011


Dear Peter and Ranjan,

In addition to Anova(), linearHypothesis() in the car package handles
multivariate linear models, including those for repeated measures.

Best,
 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 peter dalgaard
> Sent: March-20-11 6:50 PM
> To: Ranjan Maitra
> Cc: R-help
> Subject: Re: [R] manova question
> 
> 
> On Mar 20, 2011, at 21:05 , Ranjan Maitra wrote:
> 
> > Dear friends,
> >
> > Sorry for this somewhat generically titled posting but I had a
> > question with using contrasts in a manova context. So here is my
> question:
> >
> > Suppose I am interested in doing inference on \beta in the case of the
> > model given by:
> >
> > Y = X %*% \beta + e
> >
> > where Y is a n x p matrix of observations, X is a n x m design matrix,
> > \beta is m x p matrix of parameters, and e is a normally-distributed
> > random matrix with mean zero and independent rows, each having
> > dispersion matrix given by \Sigma. Then, I know (I think) how to
> > perform MANOVA. Specifically, I use:
> >
> > fit <- manova(Y ~ X)
> >
> > and
> >
> > summary(fit) will allow me to perform appropriate inference on beta.
> >
> > Now, suppose I am interested in doing inference on C %*% \beta %*% M
> > (say testing whether this is equal to zero) with C and M being q x m
> > and p x r matrices, respectively (with q, r both being no more than
> > p), then can this be done using the manova object from the above? How?
> > If not, is there an efficient way to do this?
> 
> Check out anova.mlm(), it does most of this sort of testing. Not quite
> the "C %*% ..." bit because the linear model code is not really built to
> handle linear constraints, but rather compare nested models, each
> specified using a set of betas. (So you usually test whether a subset of
> betas is zero).
> 
> Also check out the "car" package. Its Anova() function does some similar
> stuff.
> 
> If noone has done so already, I wouldn't think it to be very hard to
> implement the general case. Most of the bits are there already.
> 
> --
> Peter Dalgaard
> Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000
> Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.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