Learn R Programming

climtrends (version 1.0.6)

FindOutliersMAD: Find outliers based on the absolute deviation around the median

Description

FindOutliersMAD returns the position of the values outside the allowed range by a criteria based on the the absolute deviation around the median (MAD), median-coef*MAD

Usage

FindOutliersMAD(dataSeries,coef=3)

Arguments

dataSeries
time series of climate data
coef
coefficient, 3=very conservative, 2.5=moderately conservative 2=poorly conservative.

Value

Vector with the positions of the outliers.

Source

Leys C, Ley C, Klein O, Bernard P, Licata L, 2013 Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median Journal of Experimental Social Psychology volume 49, number 4 urlhttp://www.sciencedirect.com/science/article/pii/S0022103113000668

References

Leys C, Ley C, Klein O, Bernard P, Licata L, 2013 Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median Journal of Experimental Social Psychology volume 49, number 4 urlhttp://www.sciencedirect.com/science/article/pii/S0022103113000668

Examples

Run this code
y = c(1, 3, 3, 6, 8, 10, 10, 1000)
outlierMAD <- FindOutliersMAD(y)
y[outlierMAD]

Run the code above in your browser using DataLab