outms: Classic Outlier Detection Method

Description Usage Arguments Details Examples

Description

Classic Outlier Detection Method

Usage

1
outms(x, crit = 2, na.rm = TRUE, plotit = TRUE)

Arguments

x

An R object. Currently there are methods for numeric/logical vectors and date, date-time and time interval objects. Complex vectors are allowed for trim = 0, only.

crit

how many standard deviations from the mean?

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

plotit

Logical; Plot it or not?

Details

In words, declare X an outlier if it is more than two standard deviations from the mean.

A commonly used variation of this rule is to declare a value an outlier if it is more than three standard deviations from the mean.

Examples

1
2
x <- c(-158, 2, 8, 9, 10, 16, 18, -148, 22, 27, 29, 35, 42)
outms(x, plotit = TRUE)

shizidushu/fsrs documentation built on May 26, 2019, 4:32 a.m.