Learn R Programming

vardpoor (version 0.2.0.9.2)

incPercentile: Estimation of weighted percentiles

Description

The function computes the estimates of weighted percentiles.

Usage

incPercentile(inc, weights = NULL, sort = NULL,
  Dom = NULL, k = c(20, 80), dataset = NULL, na.rm = FALSE)

Arguments

inc
Study variable (for example equivalized disposable income). One dimentional object convertable to one-column data.frame or variable name as character, column number or logical vector with only one TRUE value (length of the vector
weights
Optional weight variable. One dimentional object convertable to one-column data.frame or variable name as character, column number or logical vector with only one TRUE value (length of the vector has to be the same as the column
sort
Optional variable to be used as tie-breaker for sorting. One dimentional object convertable to one-column data.frame or variable name as character, column number or logical vector with only one TRUE value (length of the vector ha
Dom
Optional variables used to define population domains. If supplied, the estimates of percentiles are computed for each domain. An object convertable to data.frame or variable names as character vector, column numbers or logical vector (length
k
A vector of integers between 0 and 100 specifying the percentiles to be computed (0 gives the minimum, 100 gives the maximum).
dataset
Optional survey data object convertable to data.frame.
na.rm
A logical value indicating whether missing values in study variable should be removed.

Value

  • A numeric vector (if Dom is NULL) or a data.frame (if Dom is not NULL) 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

Run this code
data(eusilc)
incPercentile("eqIncome", weights = "rb050",
  Dom = "db040", data = eusilc)

Run the code above in your browser using DataLab