Learn R Programming

biotools (version 1.2)

boxM: Box's M-test

Description

It performs the Box's M-test for homogeneity of covariance matrices obtained from multivariate normal data according to one classification factor. The test is based on the chi-square approximation.

Usage

boxM(data, grouping)

Arguments

data
a numeric data.frame or matrix containing n observations of p variables; it is expected that n > p.
grouping
a vector of length n containing the class of each observation; it is usualy a factor.

Value

  • A list with class "htest" containing the following components:
  • statistican approximated value of the chi-square distribution.
  • parameterthe degrees of freedom related of the test statistic in this case that it follows a Chi-square distribution.
  • p.valuethe p-value of the test.
  • cova list containing the within covariance matrix for each level of grouping.
  • pooledthe pooled covariance matrix.
  • logDeta vector containing the natural logarithm of each matrix in cov.
  • data.namea character string giving the names of the data.
  • methodthe character string "Box's M-test for Homogeneity of Covariance Matrices".

References

Morrison, D.F. (1976) Multivariate Statistical Methods.

Examples

Run this code
data(iris)
boxM(iris[, -5], iris[, 5])

# End (not run)

Run the code above in your browser using DataLab