Learn R Programming

rifreg (version 1.1.0)

get_rif_interquantile_range: Estimate RIF of interquantile range

Description

Compute the recentered influence function (RIF) of a weighted interquantile range.

Usage

get_rif_interquantile_range(dep_var, weights, probs, ...)

Value

A data frame with one column containing the RIF of the interquantile range for each observation and one column containing the weights.

Arguments

dep_var

dependent variable of distributional function. Discrete or continuous numeric vector.

weights

numeric vector of non-negative observation weights, hence of same length as dep_var. The default (NULL) is equivalent to weights = rep(1, length(dep_var)).

probs

a vector of length 2 with probabilities corresponding to the limits of the interquantile range of interest. The interquantile range is defined as difference between the quantile with the larger probability and the one with the lower probability.

...

further arguments passed on to density.

References

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

Examples

Run this code

set.seed(123)
dep_var <- rlnorm(100)
weights <- rep(1, 100)
get_rif_interquantile_range(dep_var, probs = c(0.1, 0.9), weights = weights)

Run the code above in your browser using DataLab