weighted_mad | R Documentation |
Weighted median of the absolute deviations from the weighted median
weighted_mad(x, w, na.rm = FALSE, constant = 1.482602)
x |
|
w |
|
na.rm |
|
constant |
|
The weighted MAD is computed as the (normalized) weighted median of the
absolute deviation from the weighted median; see
weighted_median
. The weighted MAD is normalized to be
an unbiased estimate of scale at the Gaussian core model. If
normalization is not wanted, put constant = 1
.
Weighted median absolute deviation from the (weighted) median
Overview (of all implemented functions)
head(workplace)
# normalized weighted MAD (default)
weighted_mad(workplace$employment, workplace$weight)
# weighted MAD (without normalization)
weighted_mad(workplace$employment, workplace$weight, constant = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.