outliersMD {nipnTK}R Documentation

Mahalanobis distance to detect bivariate outliers

Description

Mahalanobis distance to detect bivariate outliers

Usage

outliersMD(x, y, alpha = 0.001)

Arguments

x

Numeric vector

y

Numeric vector

alpha

Critical alpha value to detect an outlier (defaults to 0.001)

Value

A logical vector (TRUE for an outlier at p < alpha)

Examples

# Use outliersMD() to detect outliers in an anthropometric data from
# a SMART survey from the Democratic Republic of Congo (sp.ex01)
svy <- sp.ex01
svy[outliersMD(svy$height,svy$weight), ]


[Package nipnTK version 0.2.0 Index]