Learn R Programming

asbio (version 0.2-1)

V.mat: Pooled covariance matrices for multivariate procedures.

Description

Calculates a pooled covariances matrix ala legendre and Legendre (1998). This is required for a number of multivariate procedures including the Kullback statistic for multivariate homoscedasticity, and Hotelling's test.

Usage

V.mat(Y, X)

Arguments

Y
An n x p matrix of quantative dependent variables.
X
A n x 1 of categorical groups (e.g. factor levels).

References

Legendre, P, and L. Legendre (1998) Numerical ecology, 2nd English edition. Elsevier, Amsterdam, The Netherlands.

See Also

Kullback, Hotelling

Examples

Run this code
Y1<-rnorm(100,12,2)
Y2<-rnorm(100,14,2)
X<-c(rep(1,50),rep(2,50))
V.mat(cbind(Y1,Y2),X)

Run the code above in your browser using DataLab