hr05CriticalValue: Hardin and Rocke (2005) Critical Value for Testing MCD-based...

hr05CriticalValueR Documentation

Hardin and Rocke (2005) Critical Value for Testing MCD-based Mahalanobis Distances

Description

Hardin and Rocke (2005) provide an approximate F distribution for testing whether Mahalanobis distances calculated using the MCD dispersion estimate are unusually large, and hence, indicative of outliers in the data.

Usage

hr05CriticalValue(em, p.dim, signif.alpha)

Arguments

em

(Numeric) Degrees of freedom for Wishart distribution approximation to the MCD scatter matrix.

p.dim

(Integer) Dimension of the data, i.e., number of variables.

signif.alpha

(Numeric) Significance level for testing the null hypothesis

Details

Hardin and Rocke (2005) derived an F distributional approximation for the Mahalanobis distances of the observations that were excluded from the MCD calculation; see equation 3.2 on page 938 of the paper.

It is assumed here that the MCD covariance estimate used in the Mahalanobis distance calculation was adjusted by the consistency factor, so it is not included in the calculation here. (If one needs the consistency factor it is returned by the function ch99AsymptoticDF in this package or by the function .MCDcons in the robustbase package.)

Value

The appropriate cutoff value (from the F distributional approximation) for testing whether a Mahalanobis distance is unusually large at the specified significance level.

Note

It can happen that one of the F distribution paramaters, m - p + 1, is non-positive, in which case qf will return NaN. hr05CriticalValue will issue a warning in this case, and return NA.

Author(s)

Written and maintained by Christopher G. Green <christopher.g.green@gmail.com>

References

J. Hardin and D. M. Rocke. The distribution of robust distances. Journal of Computational and Graphical Statistics, 14:928-946, 2005. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/106186005X77685")}

See Also

hr05AdjustedDF, hr05CutoffMvnormal

Examples

hr05CriticalValue( hr05AdjustedDF( 1000, 20 ), 20, 0.05 ) 

CerioliOutlierDetection documentation built on June 23, 2024, 9:06 a.m.