Learn R Programming

MVTests (version 1.1)

BoxM: Box's M Test

Description

BoxM function tests whether the covariance matrices of independent samples are equal or not.

Usage

BoxM(data, group)

Arguments

data

a data frame.

group

grouping vector.

Value

a list with 3 elements:

ChiSquare

The value of Test Statistic

df

The Chi-Square statistic's degree of freedom

p.value

p value

Details

This function computes Box-M test statistic for the covariance matrices of independent samples. The hypotheses are defined as H0:The Covariance matrices are homogeneous and H1:The Covariance matrices are not homogeneous

References

Rencher, A. C. (2003). Methods of multivariate analysis (Vol. 492). John Wiley & Sons.

Examples

Run this code
# NOT RUN {
data(iris) 
results <- BoxM(data=iris[,1:4],group=iris[,5])
summary(results)
# }

Run the code above in your browser using DataLab