[R] Equality between covariance matrices?

Greg Snow Greg.Snow at imail.org
Fri Jan 22 22:47:49 CET 2010


One approach is to do a permutation test on the covariances.  You need a measure of how different they are (maximum difference, mean difference).  Calculate that for the original data.  Then randomly permute observations as to which group they are in and recalculate your difference measure.  Repeat that a bunch of times (9999 maybe) then see where your difference for the original data falls in the distribution of all the differences.  If the population covariances are the same, then the observed should fall somewhere in the middle.  If they are different, then the observed should be in a tail (the proportion more extreme than the observed is the p-value).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Robert Lonsinger
> Sent: Friday, January 22, 2010 10:23 AM
> To: r-help at r-project.org
> Subject: [R] Equality between covariance matrices?
> 
> I have conducted a discriminant function analysis with lda() in the
> MASS
> Package, and I am interested in testing that the covariance matrices of
> the
> groups are equal.
> 
> Does anybody have any suggestions on how I could test for equality
> between
> covariance matrices?
> 
> Any help would be great.  Thank you in advance.
> 
> Cheers -Rob
> 
> --
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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