arw_adjustment | R Documentation |
Implements the ARW procedure to compute an adjusted cutoff for squared Mahalanobis distances, then re-estimates location and scatter excluding points beyond the cutoff.
arw_adjustment(x, m0, c0, alpha, pcrit)
x |
A numeric matrix or data frame of observations (rows) by variables (columns), with at least 2 columns. |
m0 |
A numeric vector of initial location estimates (length equal to number of columns in |
c0 |
A numeric covariance matrix corresponding to |
alpha |
Numeric; significance level for the chi-square threshold. Defaults to 0.05 if not provided. |
pcrit |
Numeric; minimal proportion for the adjusted cutoff. If not provided, it is computed as:
|
A list with the following components:
m
, the updated location vector after excluding outliers;
c
, the updated covariance matrix;
cn
, the adjusted cutoff on Mahalanobis distances;
w
, a logical vector indicating which observations have distance less than or equal to cn
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.