Peirce: Peirces function to remove outliers

Description Usage Arguments Details Value See Also Examples

View source: R/Peirce.R

Description

Remove outliers from a vector based on Peirces criterion.

Usage

1
Peirce(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 the number of independent processes giving rise to errors. For practical purposes m should generally be restricted to 1.

Value

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

See Also

See Also PeirceGould, PeirceVsChauvenet

Examples

1
2
3
4
5
## Not run: 
v1 <- c(101.2, 90.0, 99.0, 102.0, 103.0, 100.2, 89.0, 98.1, 101.5, 102.0)
Peirce(v1) # 2 outliers removed
	
## End(Not run)

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