Learn R Programming

Morpho (version 2.6)

covW: calculate the pooled within groups covariance matrix

Description

calculate the pooled within groups covariance matrix

Usage

covW(data, groups, robust = c("classical", "mve", "mcd"), ...)

Arguments

data

a matrix containing data

groups

grouping variables

robust

character: determines covariance estimation methods in case sep=TRUE, when covariance matrices and group means can be estimated robustly using MASS::cov.rob. Default is the standard product-moment covariance matrix.

...

additional parameters passed to MASS::cov.rob for robust covariance and mean estimations.

Value

Returns the pooled within group covariance matrix. The attributes contain the entry means, containing the respective group means.

See Also

cov, typprobClass

Examples

Run this code
# NOT RUN {
data(iris)
poolCov <- covW(iris[,1:4],iris[,5])
# }

Run the code above in your browser using DataLab