Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/weightedMedian.R
Compute the weighted median (Eurostat definition).
1 | weightedMedian(x, weights = NULL, sorted = FALSE, na.rm = FALSE)
|
x |
a numeric vector. |
weights |
an optional numeric vector giving the sample weights. |
sorted |
a logical indicating whether the observations in |
na.rm |
a logical indicating whether missing values in |
The implementation strictly follows the Eurostat definition.
The weighted median of values in x
is returned.
Andreas Alfons and Matthias Templ
Working group on Statistics on Income and Living Conditions (2004) Common cross-sectional EU indicators based on EU-SILC; the gender pay gap. EU-SILC 131-rev/04, Eurostat.
arpt
, incMedian
,
weightedQuantile
1 2 | data(eusilc)
weightedMedian(eusilc$eqIncome, eusilc$rb050)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.