incPercentile {vardpoor} | R Documentation |
Estimation of weighted percentiles
Description
The function computes the estimates of weighted percentiles.
Usage
incPercentile(
Y,
weights = NULL,
sort = NULL,
Dom = NULL,
period = NULL,
k = c(20, 80),
dataset = NULL,
checking = TRUE
)
Arguments
Y |
Study variable (for example equalized disposable income). One dimensional object convertible to one-column |
weights |
Optional weight variable. One dimensional object convert to one-column |
sort |
Optional variable to be used as tie-breaker for sorting. One dimensional object convertible to one-column |
Dom |
Optional variables used to define population domains. If supplied, the estimates of percentiles are computed for each domain. An object convertible to |
period |
Optional variable for survey period. If supplied, linearization of at-risk-of-poverty threshold is done for each survey period. Object convertible to |
k |
A vector of values between 0 and 100 specifying the percentiles to be computed (0 gives the minimum, 100 gives the maximum). |
dataset |
Optional survey data object convertible to |
checking |
Optional variable if this variable is TRUE, then function checks data preparation errors, otherwise not checked. This variable by default is TRUE. |
Value
A data.table containing the estimates of weighted income percentiles specified by k
.
References
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.
See Also
Examples
library("laeken")
data("eusilc")
incPercentile(Y = "eqIncome", weights = "rb050", Dom = "db040", dataset = eusilc)