covClassic {RobStatTM} | R Documentation |
Classical Covariance Estimation
Description
Compute an estimate of the covariance/correlation matrix and location vector using classical methods.
Usage
covClassic(
data,
corr = FALSE,
center = TRUE,
distance = TRUE,
na.action = na.fail,
unbiased = TRUE
)
Arguments
data |
a numeric matrix or data frame containing the data. |
corr |
a logical flag. If |
center |
a logical flag or a numeric vector of length |
distance |
a logical flag. If |
na.action |
a function to filter missing data. The default |
unbiased |
a logical flag. If |
Details
Its main intention is to return an object compatible to that
produced by covRob
, but fit using classical methods.
Value
a list with class “covClassic” containing the following elements:
center |
a numeric vector containing the estimate of the location vector. |
cov |
a numeric matrix containing the estimate of the covariance matrix. |
cor |
a numeric matrix containing the estimate of the correlation matrix if the argument |
dist |
a numeric vector containing the squared Mahalanobis distances. Only present if |
call |
an image of the call that produced the object with all the arguments named. The matched call. |
Note
Originally, and in S-PLUS, this function was called cov
; it has
been renamed, as that did mask the function in the standard package stats.
Examples
data(wine)
round( covClassic(wine)$cov, 2)