Skip to contents

Box's M-test

Usage

boxM(
  Y,
  group,
  tol = 1e-10,
  fxn = cor,
  method = c("pearson", "kendall", "spearman")
)

Arguments

Y

response matrix

group

factor defining groups

tol

tolerance for eigen values

fxn

define function. Here default is cor to compare correlation structure. Use cov to compare covariance structure like in heplots::boxM

method

specify which correlation method: "pearson", "kendall" or "spearman"

Examples

data(iris)

boxM( iris[,1:4], iris[,5])
#> 
#> 	Box's M-test for Homogeneity of Covariance Matrices
#> 
#> data:  iris[, 1:4]
#> Chi-Sq (approx.) = 73.184, df = 20, p-value = 5.456e-08
#>