mad: Compute a robust median absolute deviation (MAD)

View source: R/tests_regular.R

madR Documentation

Compute a robust median absolute deviation (MAD)

Description

Compute a robust median absolute deviation (MAD)

Usage

mad(data, centile = 50, medianCorrected = TRUE)

Arguments

data

The data for which we compute the robust deviation

centile

The centile used to exclude extreme values (only the "centile" part of the data are is to compute the mad)

medianCorrected

TRUE if the series is corrected for its median, FALSE if the median is supposed to be 0

Value

The median absolute deviation

Examples

y <- rnorm(1000)
m <- rjd3toolkit::mad(y, centile = 70)

palatej/rjd3toolkit documentation built on Oct. 30, 2024, 10:46 p.m.