horn.outliers: Determines outliers using Horn's method and Tukey's...

Description Usage Arguments Value Author(s) References Examples

View source: R/referenceIntervals.R

Description

This function determines outliers in a Box-Cox transformed dataset using Horn's method of outlier detection using Tukey's interquartile fences. If a data point lies outside 1.5 * IQR from the 1st or 3rd quartile point, it is an outlier.

Usage

1

Arguments

data

A vector of data points.

Value

Returns a list containing a vector of outliers and a vector of the cleaned data (subset).

outliers

A vector of outliers from the data set

subset

A vector containing the remaining data, cleaned of outliers

Author(s)

Daniel Finnegan

References

ASVCP reference interval guidelines: determination of de novo reference intervals in veterinary species and other related topics. Vet Clin Pathol 41/4 (2012) 441-453, 2012 American Society for Veterinary Clinical Pathology

Horn, P. S., Feng, L., Li, Y., & Pesce, A. J. (2001). Effect of outliers and nonhealthy individuals on reference interval estimation. Clinical Chemistry, 47(12), 2137-2145.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
horn.outliers(set200)

## The function is currently defined as
function (data) 
{
    descriptives = summary(data)
    Q1 = descriptives[[2]]
    Q3 = descriptives[[5]]
    IQR = Q3 - Q1
    out = subset(data, data <= (Q1 - 1.5 * IQR) | data >= (Q3 + 
        1.5 * IQR))
    sub = subset(data, data > (Q1 - 1.5 * IQR) & data < (Q3 + 
        1.5 * IQR))
    return(list(outliers = out, subset = sub))
  }

referenceIntervals documentation built on May 30, 2017, 3:08 a.m.