Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Author(s)

Stefan Schlager

See Also

Examples

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

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.