Learn R Programming

rifreg (version 1.1.0)

get_rif_gini: Estimate RIF of Gini coefficient

Description

Compute the recentered influence function (RIF) of a weighted Gini coefficient.

Usage

get_rif_gini(dep_var, weights)

Value

A data frame with one column containing the RIF of the Gini coefficient for each observation.

Arguments

dep_var

values of a non-negative continuous dependent variable

weights

numeric vector of non-negative observation weights, hence of same length as dep_var.

References

Cowell, Frank A., and Emmanuel Flachaire. 2007. "Income distribution and inequality measurement: The problem of extreme values." Journal of Econometrics, 141(2), 1044-1072.

Firpo, Sergio P., Nicole M. Fortin, and Thomas Lemieux. 2018. “Decomposing Wage Distributions Using Recentered Influence Function Regressions.” Econometrics 6(2), 28.

Monti, Anna Clara. 1991. "The study of the Gini concentration ratio by means of the influence function." Statistica 51(4), 561–577.

Examples

Run this code

set.seed(123)
dep_var <- rlnorm(100)
weights <- rep(1, 100)
rif_gini <- get_rif_gini(dep_var = dep_var, weights = weights)
rif_gini

gini <- compute_gini(dep_var = dep_var, weights = weights)
all.equal(gini, mean(rif_gini$rif_gini))

Run the code above in your browser using DataLab