Learn R Programming

laeken (version 0.4.3)

qsr: Quintile share ratio

Description

Estimate the quintile share ratio, which is defined as the ratio of the sum of equivalized disposable income received by the top 20% to the sum of equivalized disposable income received by the bottom 20%.

Usage

qsr(inc, weights = NULL, sort = NULL, years = NULL,
    breakdown = NULL, design = NULL, cluster = NULL,
    data = NULL, var = NULL, alpha = 0.05, na.rm = FALSE,
    ...)

Arguments

inc
either a numeric vector giving the equivalized disposable income, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data.
weights
optional; either a numeric vector giving the personal sample weights, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data.
sort
optional; either a numeric vector giving the personal IDs to be used as tie-breakers for sorting, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of
years
optional; either a numeric vector giving the different years of the survey, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data. If sup
breakdown
optional; either a numeric vector giving different domains, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data. If supplied, the value
design
optional and only used if var is not NULL; either an integer vector or factor giving different strata for stratified sampling designs, or (if data is not NULL) a character string, an integer
cluster
optional and only used if var is not NULL; either an integer vector or factor giving different clusters for cluster sampling designs, or (if data is not NULL) a character string, an integer o
data
an optional data.frame.
var
a character string specifying the type of variance estimation to be used, or NULL to omit variance estimation. See variance for possible values.
alpha
numeric; if var is not NULL, this gives the significance level to be used for computing the confidence interval (i.e., the confidence level is $1 -$alpha).
na.rm
a logical indicating whether missing values should be removed.
...
if var is not NULL, additional arguments to be passed to variance.

Value

  • A list of class "qsr" (which inherits from the class "indicator") with the following components:
  • valuea numeric vector containing the overall value(s).
  • valueByStratuma data.frame containing the values by domain, or NULL.
  • varMethoda character string specifying the type of variance estimation used, or NULL if variance estimation was omitted.
  • vara numeric vector containing the variance estimate(s), or NULL.
  • varByStratuma data.frame containing the variance estimates by domain, or NULL.
  • cia numeric vector or matrix containing the lower and upper endpoints of the confidence interval(s), or NULL.
  • ciByStratuma data.frame containing the lower and upper endpoints of the confidence intervals by domain, or NULL.
  • alphaa numeric value giving the significance level used for computing the confidence interval(s) (i.e., the confidence level is $1 -$alpha), or NULL.
  • yearsa numeric vector containing the different years of the survey.
  • strataa character vector containing the different domains of the breakdown.

Details

The implementation strictly follows the Eurostat definition.

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

incQuintile, variance, gini

Examples

Run this code
data(eusilc)

# overall value
qsr("eqIncome", weights = "rb050", data = eusilc)

# values by region
qsr("eqIncome", weights = "rb050",
    breakdown = "db040", data = eusilc)

Run the code above in your browser using DataLab