incPercentile: Estimation of weighted percentiles

Description Usage Arguments Value References See Also Examples

View source: R/incPercentile.R

Description

The function computes the estimates of weighted percentiles.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 data.table or variable name as character, column number.

weights

Optional weight variable. One dimensional object convert to one-column data.table or variable name as character, column number.

sort

Optional variable to be used as tie-breaker for sorting. One dimensional object convertible to one-column data.table or variable name as character, column number.

Dom

Optional variables used to define population domains. If supplied, the estimates of percentiles are computed for each domain. An object convertible to data.table or variable names as character vector, column numbers.

period

Optional variable for survey period. If supplied, linearization of at-risk-of-poverty threshold is done for each survey period. Object convertible to data.table or variable names as character, column numbers as numeric vector.

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 data.table.

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

linarpt, linarpr, linqsr

Examples

1
2
3
library("laeken")
data("eusilc")
incPercentile(Y = "eqIncome", weights = "rb050", Dom = "db040", dataset = eusilc)

vardpoor documentation built on Nov. 30, 2020, 5:08 p.m.