covW: calculate the pooled within groups covariance matrix

View source: R/typprob.r

covWR Documentation

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.

Author(s)

Stefan Schlager

See Also

cov, typprobClass

Examples

data(iris)
poolCov <- covW(iris[,1:4],iris[,5])

Morpho documentation built on June 22, 2024, 7:19 p.m.