maha: Outlier detection using Mahalanobis Distance
Description
Takes a dataset and finds its outliers using modelbased method
Usage
maha(x, cutoff = 0.95, rnames = FALSE)
Arguments
x
dataset for which outliers are to be found
cutoff
Percentile threshold used for distance, default value is 0.95
rnames
Logical value indicating whether the dataset has rownames, default value is False
Value
Outlier Observations: A matrix of outlier observations
Location of Outlier: vector of Sr. no. of outliers
Outlier probability: vector of (1-p value) of outlier observations
Details
maha computes Mahalanibis distance an observation and based on the Chi square cutoff, labels an observation as outlier. Outlierliness of the labelled 'Outlier' is also reported based on its p values. For bivariate data, it also shows the scatterplot of the data with labelled outliers.
References
Barnett, V. 1978. The study of outliers: purpose and model. Applied Statistics, 27(3), 242<U+2013>250.