I would like to test the hypothesis that the difference between pairs, for several variables, is zero. This is easily done separately for each variable with: lm(Y ~ rep(0, nrow(Y))) where Y is a matrix whose columns are the differences for each variable between pair members. However, I would like to get an overall probability across all variables from a Wilks or Pillai-Bartlett statistic as in MANOVA. However, the analogous command: manova(Y ~ rep(0, nrow(Y))) does not work presumably because the predictor variable is not a factor. This would be a repeated-measures MANOVA, except that it is a trivial case of only one repeat, so the difference between pair members can simply be used as the variable of interest. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thanks everyone for your help on this question. I solved the problem by writing a procedure to calculate Hotelling's T^2 for a one-sample, multivariate t-test. Here's how it looks, perhaps it will be useful to others. data <- cbind(rnorm(50, 0.1, .01), rnorm(50,.1,.01), rnorm(50,.1,.01)) k <- ncol(data) n <- nrow(data) xbar <- apply(data, 2, mean) mubar <- rep(0,k) #hypothesized means are zero dbar <- xbar - mubar v <- var(data) t2 <- n*dbar%*%solve(v)%*%dbar F <- (n-k)*t2/((n-1)*k) P <- 1-pf(F,k,n-k) A previous post by Peter B. Mandeville was very helpful, as well as the Johnson/Wichern book on multivariate stats. -S. Schultz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Just a quick followup question: is it true that although manova() performs multivariate two-sample t-tests, it currently does not perform multivariate one-sample t-tests? -S. Schultz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>It's not true, indeed false in almost every detail. manova performs no >tests at all. summary.manova uses multivariate tests in an ANOVA table, >but they are not t-tests and there is an experimental design, not one or >two samples. > >I am at loss as to what you meant! If you want to test the overall mean >vector in such a design, you can do so by specifying intercept=TRUE in >summary.manova.What is the original manova() statement in such a case? In other words, one has several variables, and the desire is to test whether the mean of each is zero (the "treatment" has been subsumed by the definition of the variable, which is a before-after difference). manova(Y~rep(0,nrow(Y))) is the intuitive choice, but doesn't work. -S. Schultz>Brian D. Ripley, ripley at stats.ox.ac.uk >Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >University of Oxford, Tel: +44 1865 272861 (self) >1 South Parks Road, +44 1865 272860 (secr) >Oxford OX1 3TG, UK Fax: +44 1865 272595-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._