hrSimNew is used to calculate statistics like those presented
in Tables 1–3 of Hardin and Rocke (2005), page 942, but with the
modified asymptotic formulas calculated in Green and Martin (2014).
hrSimNew(p, n, N, B = 10000, alpha = 0.05, mcd.alpha = max.bdp.mcd.alpha(n, p))
The dimension of the data used in each simulated run.
The number of observations used in each simulated run.
The number of simulations to run.
The batch/block size: the number of simulations to run
in each block. This is useful when running very large
simulation runs (
The significance level to use for detecting outliers.
The fraction of the data to use in computing the MCD. Defaults to the maximum breakdown point fraction.
This is a work function designed for use in replicating Tables 1–3 of Hardin and Rocke (2005), page 942, but using the asymptotic method of Green and Martin (2014) instead of the Hardin-Rocke method. The Green and Martin method is more accurate for MCD fractions other than the maximum breakdown point one.
Internally the simulation function does
B runs at a time. Set
B smaller if your machine has less memory.
This function is nearly identical to
hrSim, except that
it uses different cutoff values.
The function returns a matrix with
N rows, one for each simulation,
and at present, 9 columns: each column reports the fraction of observations
in a simulation run that exceeded a given threshold (i.e., were flagged as
The first three test Mahalanobis distances (MD) against a chi-squared quantile (prefix is “CHI2”);
the next three test MDs against the asympotic cutoff used in Green and Martin (2014) (prefix is “CGASY”); and
the last three test against the cutoff predicted in Green and Martin (2014) (prefix is “GGPRED”).
Within each group of three, the first entry (suffix “RAW”) uses (raw) MDs without the consistency correction or the small sample correction; the second entry (suffix “CON”) uses (raw) MDs without the small sample correction; and the third entry (suffix “SM”) uses the (raw) MDs with both correction factors. (It was not clear to the package author whether Hardin and Rocke (2005) used these correction factors in their calculations; so all variants were calculated and examined. Empirically, it seems the “CON” approach is the best match for their results.)
Look at the column means of the resulting matrix to see the average fraction of outliers detected (which is an estimate of the Type 1 error rate of the procedure, since the simulated data had no outliers).
This function is deprecated; use
Written and maintained by Christopher G. Green <[email protected]>
C. G. Green and R. Douglas Martin. An extension of a method of Hardin and Rocke, with an application to multivariate outlier detection via the IRMCD method of Cerioli. Working Paper, 2014. Available from http://students.washington.edu/cggreen/uwstat/papers/cerioli_extension.pdf
J. Hardin and D. M. Rocke. The distribution of robust distances. Journal of Computational and Graphical Statistics, 14:928-946, 2005.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.