BoxMTest {multiUS}R Documentation

Box's test for equivalence of covariance matrices

Description

The function performs Box's test for testing the null hypothesis that two or more covariance matrices are equal.

Usage

BoxMTest(X, cl, alpha = 0.05, test = "any")

Arguments

X

A data frame with the values of numberical variables.

cl

An normial or ordinal variable which defines groups (a partition) (must be of type factor).

alpha

Significance level (default 0.05).

test

Wheter the F-test (test = "F") or Chi-square (test = "ChiSq") test should be forced (see Details). In the case of default value any, the test is chosen based on the number of units by groups.

Details

If the size of any group is at least 20 units (sufficiently large), the test takes a Chi-square approximation, otherwise it takes an F approximation.

Value

A list with the following elements:

Author(s)

Andy Liaw and Aleš Žiberna (minor modifications)

References

Stevens, J. (1996). Applied multivariate statistics for the social sciences . 1992. Hillsdale, NJ: Laurence Erlbaum.

Examples

BoxMTest(X = mtcars[, c(1, 3, 4, 5)], cl = as.factor(mtcars[, 2]), alpha = 0.05)

[Package multiUS version 1.2.3 Index]