mcovs {grt} | R Documentation |
Calculate sample means and covariance(s) of multivariate data
Description
Calculate sample means and covariance(s) of multivariate data
Usage
## Default S3 method:
mcovs(x, grouping, pooled=TRUE, ...)
## S3 method for class 'formula'
mcovs(formula, data, pooled=TRUE, ...)
Arguments
formula |
A formula in the form of |
data |
Data frame from which variables specified in |
x |
data frame or Matrix containing sample values. |
grouping |
a factor specifying the population to which the samples in |
pooled |
logical. If |
... |
further arguments |
Value
A list containing:
N |
total number of samples. |
counts |
number of samples per groups. |
lev |
levels of the |
means |
a named list of vectors specifying the means for each group. Named according to |
covs |
a named list of variance-covarinace matrix(es). Named as |