[R] Manova in R vs. SAS

John Fox jfox at mcmaster.ca
Fri Nov 9 14:15:42 CET 2001


At 09:03 AM 11/9/2001 +0100, Peter Dalgaard BSA wrote:
>Bill Kristan <wbkiii at citrus.ucr.edu> writes:
>
> > While I was helping a SAS-using friend with an analysis I noticed some
> > differences in the multivariate test statistics, approximate F statistics,
> > and p-values in the manova function using R and proc GLM using SAS. The
> > univariate coefficients are identical. Is there a reason to expect R 
> and SAS
> > to give different results?
>
>Could you expand on wherein the difference lies?
>
>I don't think there is more than one definition of Wilks' Lambda, but
>are they testing the same hypothesis?

Dear Peter and Bill,

The manova function in R and PROC GLM in SAS both calculate the same four 
multivariate test statistics and associated F approximations.

For curiosity, I ran the example in the help file for manova through PROC 
GLM, as follows:

proc glm;
  classes rate additive;
  model tear gloss opacity = rate  additive rate*additive;
  manova h=rate;
  manova h=additive;
  manova h=rate*additive;
  run;

I get the same mulitvariate test statistics (and F approximations) as from 
manova in R.

This is a balanced manova, however. By default, SAS computes "types I and 
III" univariate F-tests but only "type III" multivariate tests, while the 
summary for manova gives sequential ("type I") tests. These coincide for 
balanced data, but not for unbalanced data. Is it possible that Bill is 
comparing the sequential tests from manova to the "type III" tests from SAS?

If this is the source of the discrepancy, you can add " / type = 1" to the 
manova statements in SAS to make the programs agree. Of course, you might 
not really want "type I" tests.

John

-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list