plotMD: QQ-Plot of Mahalanobis distances

Description Usage Arguments Details Value Author(s) References Examples

Description

QQ-plot of (squared) Mahalanobis distances vs. scaled F-distribution (or a scaled chisquare distribution). In addition two default cutpoints are proposed.

Usage

1
PlotMD(dist, p, alpha = 0.95, chisquare=FALSE)

Arguments

dist

a vector of Mahalanobis distances

p

the number of variables involved in the Mahalanobis distances

alpha

a probability for cut-off, usually close to 1

chisquare

A logical indicating the the chisquare distribution should be used instead of the F-distribution

Details

Scaling of the F-distribution as median(dist)*qf((1:n)/(n+1),p,n-p)/qf(0.5,p ,n-p). First default cutpoint is median(dist)*qf(alpha,p,n-p)/qf(0.5,p,n-p) and second default cutpoint is the alpha-quantile of the Mahalanobis distances.

Value

hmed

first proposed cutpoint based on F-distribution.

halpha

second proposed cutpoint (alpha-quantile)

QQ-plot

Author(s)

Beat Hulliger

References

Little, R. & Smith, P. (1987) Editing and imputation for quantitative survey data Journal of the American Statistical Association, 82, 58-68

Examples

1
2
3

Example output

 Number of missing items:  38 , percentage of missing items:  0.2  

 TRC has detected 12 outlier(s) in 0.027 seconds.

$hmed
[1] 9.740518

$halpha
[1] 152.4939

modi documentation built on May 2, 2019, 6:48 p.m.