Learn R Programming

OutlierDetection (version 0.1.1)

depthout: Outlier detection using depth based method

Description

Takes a dataset and finds its outliers using depth-based method

Usage

depthout(x, rnames = FALSE, cutoff = 0.05, boottimes = 100)

Arguments

x

dataset for which outliers are to be found

rnames

Logical value indicating whether the dataset has rownames, default value is False

cutoff

Percentile threshold used for depth, default value is 0.05

boottimes

Number of bootsrap samples to find the cutoff, default is 100 samples

Value

Outlier Observations: A matrix of outlier observations

Location of Outlier: Vector of Sr. no. of outliers

Outlier probability: Vector of proportion of times an outlier exceeds local bootstrap cutoff

Details

depthout computes depth of an observation using depthTools package and based on the bootstrapped cutoff, label an observation as outlier. Outlierliness of the labelled 'Outlier' is also reported and it is the bootstrap estimate of probability of the observation being an outlier. For bivariate data, it also shows the scatterplot of the data with labelled outliers.

References

Johnson, T., Kwok, I., and Ng, R.T. 1998. Fast computation of 2-dimensional depth contours. In Proc. Int. Conf. on Knowledge Discovery and Data Mining (KDD), New York, NY. Kno

Examples

Run this code
# NOT RUN {
#Create dataset
X=iris[,1:4]
#Outlier detection
depthout(X,cutoff=0.05)
# }

Run the code above in your browser using DataLab