Learn R Programming

asbio (version 0.2-1)

Kullback: Kullback test for equal covariance matrices.

Description

Provides Kullback's (1959) test for multivariate homoscedasticity.

Usage

Kullback(Y, X)

Arguments

Y
An n x p matrix of quantitative variables
X
An n x 1 vector of categorical assignments (e.g. factor levels)

Value

  • Returns a dataframe with the test statistic (which follows a chi-square distribution if H$_0$ is true), the chi-square degrees of freedom, and the calculated p-value.

Details

Multivariate general linear models assume equal covariance matrices for all factor levels or factor level combinations. Legendre and Legendre (1998) recommend this test for verifying homoscedsticiy. P-values evaluate a null hypothesis of equal population covariance matrices.

References

Kullback, S. (1959) Information theory and statistics. John Wiley and Sons. Legendre, P, and Legendre, L. (1998) Numerical ecology, 2nd English edition. Elsevier, Amsterdam, The Netherlands.

See Also

V.mat

Examples

Run this code
Y1<-rnorm(100,10,2)
Y2<-rnorm(100,15,2)
Y<-cbind(Y1,Y2)
X<-factor(c(rep(1,50),rep(2,50)))
Kullback(Y,X)

Run the code above in your browser using DataLab