fastMAD: Fast implementation of the median absolute deviation

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/fastMAD.R

Description

Compute the median absolute deviation with a fast C++ implementation. By default, a multiplication factor is applied for consistency at the normal model.

Usage

1
fastMAD(x, constant = 1.4826)

Arguments

x

a numeric vector.

constant

a numeric multiplication factor. The default value yields consistency at the normal model.

Value

A list with the following components:

center

a numeric value giving the sample median.

MAD

a numeric value giving the median absolute deviation.

Note

Functionality for removing observations with missing values is currently not implemented.

Author(s)

Andreas Alfons

See Also

fastMedian, mad

Examples

1
2
3
set.seed(1234)  # for reproducibility
x <- rnorm(100)
fastMAD(x)

aalfons/ccaPP documentation built on Nov. 27, 2021, 7:47 a.m.