mad_outlier {clinpubr}R Documentation

Mark possible outliers with MAD.

Description

Mark possible outliers using the median absolute deviation (MAD) method.

Usage

mad_outlier(x, constant = 1.4826 * 3)

Arguments

x

A numeric vector.

constant

The constant multiplier for the MAD. Default is 1.4826 * 3.

Details

The function calculates the median absolute deviation of the input vector and uses it to identify possible outliers. The default constant multiplier is 1.4826 * 3, which gives approximately the 3\sigma of the normal distribution.

Value

A logical vector.

See Also

mad

Examples

x <- c(1, 2, 3, 4, 5, 100)
mad_outlier(x)

[Package clinpubr version 1.0.1 Index]