fastMAD | R Documentation |
Compute the median absolute deviation with a fast C++ implementation. By default, a multiplication factor is applied for consistency at the normal model.
fastMAD(x, constant = 1.4826)
x |
a numeric vector. |
constant |
a numeric multiplication factor. The default value yields consistency at the normal model. |
A list with the following components:
center |
a numeric value giving the sample median. |
MAD |
a numeric value giving the median absolute deviation. |
Functionality for removing observations with missing values is currently not implemented.
Andreas Alfons
fastMedian
, mad
set.seed(1234) # for reproducibility
x <- rnorm(100)
fastMAD(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.