Learn R Programming

MALDIcellassay (version 0.4.47)

calculateChauvenetCriterion: Calculate Chauvenet's criterion for outlier detection

Description

Calculate Chauvenet's criterion for outlier detection

Usage

calculateChauvenetCriterion(x)

Value

logical vector, TRUE for detected outliers.

Arguments

x

numeric, values (e.g. intensities) to test for outliers

Details

Note that, as for all outlier detection criteria: Excluding data points from your measurement should only be conducted with extreme care. Even if this (or any other) function tells you that a data point is an outlier, you might still want to have it in your sample population especially if you are not sure if your data is normal distributed. See Wikipedia for details of the algorithm.

Examples

Run this code
set.seed(42) 

#no outlier
sample <- rnorm(n = 8, mean = 0, sd = 0.01)
calculateChauvenetCriterion(sample)

# introduce outlier
sample[1] <- 1
calculateChauvenetCriterion(sample)

Run the code above in your browser using DataLab