Description Usage Arguments Details Value Note Author(s) References See Also Examples

`hrSim`

is used to replicate Tables 1–3 of Hardin
and Rocke (2005), page 942.

1 | ```
hrSim(p, n, N, B = 10000, alpha = 0.05, mcd.alpha = max.bdp.mcd.alpha(n, p))
``` |

`p` |
The dimension of the data used in each simulated run. |

`n` |
The number of observations used in each simulated run. |

`N` |
The number of simulations to run. |

`B` |
The batch/block size: the number of simulations to run
in each block. This is useful when running very large
simulation runs ( |

`alpha` |
The significance level to use for detecting outliers. |

`mcd.alpha` |
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.

Internally the simulation function does `B`

runs at a time. Set
`B`

smaller if your machine has less memory.

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
outliers).

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 Hardin and Rocke (2005) (prefix is “HRASY”); and

the last three test against the cutoff predicted in Hardin and Rocke (2005) (prefix is “HRPRED”).

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 `hrSimParallel`

instead.

Written and maintained by Christopher G. Green <[email protected]>

J. Hardin and D. M. Rocke. The distribution of robust distances. Journal of Computational and Graphical Statistics, 14:928-946, 2005.

`covMcd`

, `hrSimParallel`

, `hrSimNew`

,
`hrSimNewParallel`

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.