rif_decomposite: This function decomposite the RIF regression result

Description Usage Arguments Details Author(s) References

View source: R/rif_decomposite.R

Description

This function decomposite the RIF regression result

Usage

1
rif_decomposite(formula, data, flag, idx, method, tau = NULL, kernel = NULL)

Arguments

formula

formula of RIF regression

data

data with varibales

flag

variable denotes the decompositing group, flag is the column name of the variable

idx

value of the grouping variable. idx should be a vector with two dimensions. for example idx = c(1, 2); idx = c(3, 5).

method

the distrubiton statistic to calculate recentered influence funciton, which can be choose from "mean", "quantle", "variance","gini".

tau

quantile when using quantile method

kernel

kernel used for kernel estimating of the dependent variable, selecting from "gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine", "optcosine". Used in quantile method

Details

Given are two groups, A and B; an outcome variable, Y; and a set of predictors. For example, think of a group of males and a group of females, (log) wages are the outcome variable, and human capital indicators such as education and work experience as predictors. the distribution statistics (ν) difference of outcome is,

R = v(Y_A)-v(Y_B)

where v(Y) denotes the distribution statistics of the outcome variable, such as mean, quantile, variance, gini. Based on the linear model

RIF(Y_l) = X_{l}^{'}β_l+ε_l, l \in (A, B)

where X is a vector containing the predictors and a constant, β contains the slope parameters and the intercept, and ε is the error. The outcome difference can be expressed as:

R = v(Y_A)-v(Y_B) = E(X_A)^{'}β_A-E(X_B)^{'}β_B

R = (E(X_A)-E(X_B))^{'}β^{*}+ (E(X_A)^{'}(β_A-β^{*})+E(X_B)^{'}(β{*}-β_B))

now we have a twofold decomposition.

Author(s)

Wenjing Wang Wenjingwang1990@gmail.com

References

Firpo S, Fortin N M, Lemieux T(2009). Unconditional quantile regressions. Econometrica, 77(3): 953-973.


wenjingwang/drifr documentation built on May 4, 2019, 5:20 a.m.