Learn R Programming

laeken (version 0.3.2)

gpg: Gender pay (wage) gap.

Description

Estimate the gender pay (wage) gap.

Usage

gpg(inc, gender = NULL, method = c("mean", "median"), 
    weights = NULL, sort = NULL, years = NULL, breakdown = NULL, 
    design = 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.
gender
either a factor giving the gender, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data.
method
a character string specifying the method to be used. Possible values are "mean" for the mean, and "median" for the median. If weights are provided, the weighted mean or weighted median is estimated.
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
breakdown
optional; either a numeric vector giving different strata, or (if data is not NULL) a character string, an integer or a logical vector specifying the corresponding column of data. If supplied, the val
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 integ
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 "gpg" (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 stratum, 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 stratum, 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 stratum, or NULL.
  • alphaa numeric value giving the significance level used for computing the confidence interv al(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 strata of the breakdown.

Details

The implementation strictly follows the Eurostat definition (with default method "mean" and alternative method "median"). If weights are provided, the weighted mean or weighted median is estimated.

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

variance, qsr, gini

Examples

Run this code
data(eusilc)
### clearly, children and elder people may not work in Austria:
eusilc <- eusilc[eusilc$age > 17 & eusilc$age < 66, ]
### full time workers:
eusilc <- eusilc[eusilc$pl030 == 1, ]
### employees's cash income:
### py010n
eusilc <- eusilc[!is.na(eusilc$py010n), ]
### for estimation of the GPG, use hourly rates of people 
### who earn money and NOT just yearly income as done in 
### the following examples!

median_no_breakdown <- gpg("py010n", "rb090", method = "median", 
    weights = "rb050", data = eusilc)
mean_no_breakdown <- gpg("py010n", "rb090", method = "mean", 
    weights = "rb050", data = eusilc)

variance("py010n", gender = "rb090", method = "median", 
    weights = "rb050", design = "db040", data = eusilc, 
    indicator = median_no_breakdown, bootType = "naive", 
    seed = 123)

variance("py010n", gender = "rb090", method = "mean", 
    weights = "rb050", design = "db040", data = eusilc, 
    indicator = mean_no_breakdown, bootType = "naive", 
    seed = 123)


median_breakdown_area <- gpg("py010n", "rb090", 
    method = "median", breakdown = "db040", 
    weights = "rb050", data = eusilc)

variance("py010n", gender = "rb090", method = "median", 
    breakdown = "db040", weights = "rb050", design = "db040", 
    data = eusilc, indicator = median_breakdown_area, 
    bootType = "naive", seed = 123)


mean_breakdown_area <- gpg("py010n", "rb090", method = "mean", 
    breakdown = "db040", weights = "rb050", data = eusilc)

variance("py010n", gender = "rb090", method = "mean", 
    breakdown = "db040", weights = "rb050", design = "db040", 
    data = eusilc, indicator = mean_breakdown_area, 
    bootType = "naive", seed = 123)

Run the code above in your browser using DataLab