[R] manova question

peter dalgaard pdalgd at gmail.com
Sun Mar 20 23:49:53 CET 2011


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



More information about the R-help mailing list