Description Usage Arguments Value References
This implements the reweighted median ball estimator of Olive (2004). The algorithm is initialized using the BACON algorithm of Billor, Hadi, and Velleman (2000).
The implementation in this package checks each iteration's estimate of the covariance, and if the estimated covariance matrix is not positive definite, shrinkage is applied to obtain a well conditioned covariance matrix. Following the shrinkage, the matrix is adjusted to keep the positive-definiteness while not allowing the overall size of the estimates be affected. This is done using the ratio of the trace of the initial non-positive definite matrix to the trace of the shrinkage estimated matrix, ie, cov_adj = cov_shrink * ≤ft(tr(cov_init)/tr(cov_shrink)\right).
1 | cov.rmb(x, iter = 5)
|
x |
a data frame or matrix of numeric covariates |
iter |
number of iterations. defaults to 5. recommended to leave as 5. |
delta |
the chi-square quantile used to declare outliers. defaults to 0.975 |
a covRobust object containing the following elements:
center: multivariate mean of cleaned data set after discarding outliers.
cov: covariance matrix of cleaned data set after discardng outliers.
dist: the mahalanobis distances used in calculating the weights.
outliers: the indices of the outliers identified.
weights: the weights for downweighting outliers.
Olive, D. J. (2004). A resistant estimator of multivariate location and dispersion. Computational Statistics & Data Analysis, 46, 93–102
Billor, N., Hadi, A. S., & Velleman , P. F. (2000). BACON: Blocked Adaptive Computationally-Efficient Outlier Nominators; Computational Statistics and Data Analysis 34, 279–298. doi: 10.1016/S0167-9473(99)00101-2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.