Description Usage Arguments Details Value See Also Examples
weighted_mad
computes weighted median absolute deviation from the
weighted median
1 | weighted_mad(x, w, na.rm = FALSE, constant = 1.4826)
|
x |
a numeric vector |
w |
a numeric vector of weights |
na.rm |
a logical value indicating whether |
constant |
(scale factor, default: 1.4826) |
The weighted MAD is computed as the (normalized) weighted median of the
absolute deviation from the weighted median; the median is computed as the
weighted lower sample median (see weighted_median
); the MAD
is normalized to be an unbiased estimate of scale at the Gaussian core model.
Weighted median absolute deviation from the (weighted) median
1 2 | x <- c(0.1, 0.35, 0.05, 0.1, 0.15, 0.05, 0.2)
weighted_mad(x, x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.