Quantile.Rd
Compute weighted quantiles (Eurostat definition).
Quantile(x, weights = NULL, probs = seq(0, 1, 0.25),
na.rm = FALSE, names = TRUE, type = 7, digits = 7)
a numeric vector.
an optional numeric vector giving the sample weights.
numeric vector of probabilities with values in \([0,1]\).
a logical indicating whether missing values in x
should
be omitted.
logical; if true, the result has a names
attribute.
Set to FALSE
for speedup with many probs
.
an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used. Currently only types
5
and 7
(default) are implemented.
used only when names
is true: the precision to use when formatting the percentages. In R
versions up to 4.0.x, this had been set to max(2, getOption("digits"))
, internally.
A named numeric vector containing the weighted quantiles of values in
x
at probabilities probs
is returned.
The implementation strictly follows the Eurostat definition.
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.