boxm.test | R Documentation |
This function computes the Box M test statistic for testing equality of covariance matrices. The p-value is computed using either a chi-squared or F approximation.
boxm.test(x, y, type = "chi.squared")
x |
data matrix of first group with rows representing the samples and columns representing variables. |
y |
data matrix of second group with same number of columns as |
type |
Distribution to use for calculating the p-value. Possible values are "chi.squared"(Default) and "F" |
A list with two values
The test statistic value
The p-value computed using the distribution specified in type
T. W. Anderson. An introduction to multivariate statistical analysis. Wiley Series in Probability and Statistics, 3rd edition, 2003.
library(mvtnorm)
x = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
y = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
boxm.test(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.