Description Usage Arguments Value
This is very similar to the minimum regularized covariant determinant covariance estimator. The generalized variance of a data set is in fact simply the determinant of its covariance matrix. However, this function uses an initial robust estimator of the covariance for a "leave one out" data set for each of the N-ith subsets. This is used to calculate depth values, for which an adaptive threshold is used to declare an observation an outlier. The covariance matrix is then recalculated on the subset. This process is then re-iterated until the generalized variance of the matrix converges. In order to ensure that the generalized variance is non-negative at each iteration, the estimated covariance is checked for positive-definiteness and shrinkage applied in the event of a non-positive definite matrix.
Optionally, the number of maximum iterations can be set to zero, in which case the raw generalized variance estimator will be returned.
1 | cov.mrgv(x, maxit = 10, tol = 1e-06)
|
x |
a data frame or matrix of numeric covariates |
maxit |
number of maximum iterations. defaults to 10. set to 0 to obtain the raw initial estimate. |
tol |
the tolerance value for convergence. defaults to 1e-6. |
a covRobust object containing the following elements:
center: multivariate mean of cleaned data set after removing outliers.
cov: covariance matrix of cleaned data set after removing outliers.
dist: the mahalanobis distances used in calculating the weights.
outliers: the indices of the outliers identified.
weights: the weights for downweighting outliers. here they are binary with 0 marking an outlier and 1 otherwise.
iter: the number of iterations taken to finish.
converged: TRUE if the algorithm converged by maxit, FALSE otherwise. If FALSE, re-run with a larger maxit.
trace: The generalized variance values at each iteration.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.