PeirceGould: Peirces function to remove outliers

Description Usage Arguments Details Value References See Also Examples

View source: R/PeirceGould.R

Description

Remove outliers from a vector based on Peirces criterion. Method follows the original technique in the paper by Gould below.

Usage

1
PeirceGould(v, m = 1)

Arguments

v

v vector of numeric values

m

m number of unknown quantities

Details

Calculates R, the maximum allowable absolute error for a value in the vector, and removes those values exceeding this value. m, the ‘number of unknown quantities’, may be treated as degrees of freedom of the system of observations, or the number of independent processes giving rise to errors. For practical purposes m should generally be restricted to 1. For efficiency, Peirce is preferred.

Value

A numeric vector, with outliers removed; ordered by value of absolute error.

References

Gould BA (1855). On Peirce's Criterion for the Rejection of Doubtful Observations, with tables for facilitating its application. Astronomical Journal, 4(83), 81(87)

See Also

Peirce

Examples

1
2
v1 <- c(101.2, 90.0, 99.0, 102.0, 103.0, 100.2, 89.0, 98.1, 101.5, 102.0)
Peirce(v1) # 2x outliers removed

Peirce documentation built on May 2, 2019, 5 p.m.