{smcl}
{* *! version 1.0.0 dec2018}{...}
{vieweralsosee "oaxaca" "help oaxaca"}{...}
{vieweralsosee "egen" "help rifvar"}{...}
{title:Title}
{pstd}{hi:oaxaca_rif} {hline 2} RIF Blinder-Oaxaca decomposition of outcome differentials
{title:Syntax}
{p 8 15 2}
{cmd:oaxaca_rif} {depvar} [{it:indepvars}] {ifin} {weight}
{cmd:,} {opt by(groupvar)}
[ {help oaxaca_rif##opt:{it:options}} ]
where {it:indepvars} is {it:term} [{it:term} {it:...}]
with {it:term} as {varlist}
or {cmd:(}[{help oaxaca##subsume:{it:name}}{cmd::}] {varlist}{cmd:)}
and {varlist} may contain {cmdab:n:ormalize(}{help oaxaca##norm:{it:spec}}{cmd:)}
{synoptset 25 tabbed}{...}
{marker opt}{synopthdr:options}
{synoptline}
{syntab :Main}
{synopt :{opt by(groupvar)}}specifies the groups; {cmd: by()} is required
{p_end}
{synopt :{opt rif(rifvar)}} Specifies the statistic used as outcome. {cmd: rif()} is required.
{p_end}
{synopt :{opt swp}} swap groups
{p_end}
{synopt :{opt rwlogit(varlist)}} Specifies the logit regression for the reweighting factors. Default No reweight.
{p_end}
{synopt :{opt rwprobit(varlist)}} Specifies the probit regression for the reweighting factors. Default No reweight.
{p_end}
{synopt :{opt cluster(varname)}} Specifies a variable to be used for clustered, to adjust standard errors for intragroup correlation.
{p_end}
{synopt :{opt wgt(#)}} Defines the counterfactual for the two-fold decomposition. Default is 0.
{p_end}
{p 4 6 2}
{cmd:fweight}s, {cmd:aweight}s, {cmd:pweight}s, and {cmd:iweight} are allowed;
see {help weight}.
{p_end}
{title:Description}
{pstd} {cmd:oaxaca_rif} is a mask program that uses the capabilities of {help oaxaca} to compute the reweighted Blinder-Oaxaca (BO) decomposition using a "Recentered-Influence-Function"
of various distributional statistics including the mean, quantiles, gini coefficient, among others. {break}
BO decompositions are often used to analyze average outcome gaps over 2 groups. In combination with RIFs it can be used to analyze ourcome decompositions of any distributional
statistic for which a RIF can be calculated (Firpo, Fortin, and Lemieux 2018) {break}
{cmd:depvar} is the outcome variable of interest (e.g. log wages) and {cmd:indepvars} are predictors (e.g. education, work experience, etc.). {it:groupvar}
identifies the groups to be compared. {cmd:rif(rifvar)} is used to define the RIF function to be used in the decomposition. The default is to estimate the standard BO decomposition.
When the options {cmd: rwlogit()} or {cmd: rwprobit()} are used, it estimates the Reweighted BO decomposition as described in (Firpo, Fortin, and Lemieux 2018).{break}
The standard errors of the decomposition components are computed using Robust Standard errors, and clustered at the individual level when reweighted BO decomposition is used. When using {cmd: cluster()}
standard errors are estimated using this cluster variable. For methods and
formulas see Jann (2008).{break}
It should be noticed that Firpo Fortin and Lemieux (2018) suggests to estimate standard errors using Bootstrap methods
due to the additional complication of estimating regressions based on reestimated dependent variables (RIF's).
{pstd} {cmd:oaxaca_rif} typed without arguments replays the last
results.
{marker subsume}
{title:Subsume results for sets of variables}
{pstd} Thanks to the capabilities of {help oaxaca}, decomposition results can be aggregated for subsets of variables
using syntax
{it:...} {cmd:(}[{it:name}{cmd::}] {varlist}{cmd:)} {it:...}
{pstd} where {it:name} provides a label for the subset (the name of the first
variable in the subset is used as label if {it:name} is omitted). For example,
you could type
{com}. oaxaca lnwage educ (expten: exper tenure), by(female){txt}
{pstd} to subsume the contributions of {cmd:exper} and {cmd:tenure}. Apart
from variable names, also {cmd:_cons} and {cmd:_offset} can be specified as
part of a subset.
{marker norm}
{title:Normalization of categorical variables}
{pstd} For categorical regressors, the detailed decomposition results
depend on the choice of the (omitted) base category. A solution is to
compute the decomposition based on "normalized" effects, i.e. effects that
are expressed as deviation contrasts from the grand mean (Yun 2005). Thanks to the capabilities of {help oaxaca}, one can also
"normalize" the effects for a set of indicator variables representing a
categorical variable include the indicator variables in the list of
regressors using syntax
{it:...} {opt n:ormalize(spec)} {it:...}
{pstd}where {it:spec} usually simply is the list of indicator variables.
Note that an indicator variable has to be supplied for every category
(including the base category). For example, you could type
{com}. tabulate isco, generate(isco) nofreq
. oaxaca lnwage educ exper normalize(isco1-isco9), by(female){txt}
{pstd}The {cmd:tablate, generate()} command is a convenient way to generate
a set of indicator variables from a categorical variable (such as the 9
major group ISCO-88 job classification). See {help oaxaca} for other examples using the normalized option.
{title:Options}
{dlgtab:Main}
{synopt :{opt by(groupvar)}}specifies the groups; {cmd:by()} is required
{p_end}
{synopt :{opt rif(rifvar)}} Specifies the statistic used as outcome. {cmd:rif()) is required.
{p_end}
{synopt :{opt swp}} swap groups
{p_end}
{synopt :{opt rwlogit(varlist)}} Specifies the logit regression for the reweighting factors. Default No reweight.
{p_end}
{synopt :{opt rwprobit(varlist)}} Specifies the probit regression for the reweighting factors. Default No reweight.
{p_end}
{synopt :{opt cluster(varname)}} Specifies a variable to be used for clustered, to adjust standard errors for intragroup correlation.
{p_end}
{synopt :{opt wgt(#)}} Defines the counterfactual for the two-fold decomposition. It can be 0 or 1. Default is 0.
{p_end}
{phang} {opt by(groupvar)} specifies the {it:groupvar} that defines the {it two}
groups that are to be compared. {cmd:by()} is required. While the variable itself can contain multiple groups, it should only identify two groups within the
sample used in the data {p_end}
{phang} {opt rif(rifvar)} Specifies the RIF to be estimated and used for the decomposition. {break}
Any of the following options for rifvar is allowed: {break}
option Statistic{break}
rif(mean) Mean
rif(gini) Gini coefficient
rif(var) Variance
rif(q(#)) Unconditional Quantile at any point between 0 and 100
rif(iqr(# #)) InterQuantile difference between any two point between 0 and 100.
Difference between the largest and smallest quantile.
rif(glor(#)) Generalized Lorenz ordinate given a percentile # that lies between 0 and 100.
rif(lor(#)) Lorenz ordinate given a percentile # that lies between 0 and 100.
rif(pov(a) pline(#|var)) FGT poverty measure with sensitivity {it a}. if a=0 Headcount, a=1 Poverty gap and
a=2 Poverty severity. Poverty line can be defined as a single number or a variable.
rif(entropy(#e)) Entropy Index with parameter e
rif(atkin(#a)) Atkinson Index with parameter a
RIF's are created using the {help egen} addon {help rifvar}
{phang} {opt swp} reverses the order of the groups.{p_end}
{phang} {opt rwlogit(varlist)} and {opt rwprobit(varlist)} Request to estimate the reweighted Blinder-Oaxaca decomposition as described in Firpo, Fortin and Lemiux (2018).
The variables declared are used to estimate a logit or probit model, in order to estimate the reweighting weights. Only one option is allowed.
{phang} {opt cluster(varname)} adjusts standard errors for intragroup correlation. If Ommited, standard errors are estimated using each individual as a cluster.
{phang} {opt wgt(#)} Similar to the option {it: weight()} of {help oaxaca}, it requests to compute the two-fold decomposition where # is the weight given to Group 1 relative to Group 2.
This is used to determine the counterfactual scenario for the decomposition. Only two options allowed 0 or 1. {break}
When the standard BO decomposition is done (no reweights), wgt(0) indicates the counterfactual to be X1*B2. Thus DX=(X1-X2)*B2 and DB=X1*(B1-B2), and viceversa. {break}
When the reweighted BO decomposition is obtained, wgt(0) indicates the counterfactual to be obtained by estimating the the model using data for group 2 reweighted
to have characteristics distribution similar to those in group 1, and viceversa.
{title:Examples}
. {stata "use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear"}
. {stata gen wage=exp(lnwage)}
Standard BO Decomposition
. {stata oaxaca lnwage educ exper tenure, by(female) weight(1) robust}
Standard RIF BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(mean)}
Standard BO Decomposition with weights
. {stata oaxaca lnwage educ exper tenure [pw=wt], by(female) weight(1) robust}
Standard RIF BO Decomposition with weights
. {stata oaxaca_rif lnwage educ exper tenure [pw=wt], by(female) wgt(1) rif(mean)}
Standard RIF-q(50) BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(q(50))}
Standard RIF-iqr(25 75) BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(iqr(25 75))}
Standard RIF-gini BO Decomposition
. {stata oaxaca_rif wage educ exper tenure, by(female) wgt(1) rif(gini)}
Reweighted RIF BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(mean) rwlogit(educ exper tenure)}
Reweighted RIF BO Decomposition with weights
. {stata oaxaca_rif lnwage educ exper tenure [pw=wt], by(female) wgt(1) rif(mean) rwlogit(educ exper tenure)}
Reweighted RIF-q(50) BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(q(50)) rwlogit(educ exper tenure)}
Reweighted RIF-iqr(25 75) BO Decomposition
. {stata oaxaca_rif lnwage educ exper tenure, by(female) wgt(1) rif(iqr(25 75)) rwlogit(educ exper tenure)}
Reweighted RIF-gini BO Decomposition
. {stata oaxaca_rif wage educ exper tenure, by(female) wgt(1) rif(gini) rwlogit(educ exper tenure)}
Reweighted RIF-gini BO Decomposition with bootstrap errors:
. bootstrap:oaxaca_rif wage educ exper tenure, by(female) wgt(1) rif(gini) rwlogit(educ exper tenure)
{txt}
{title:References}
{phang}
{phang} Jann, Ben (2008). The Blinder-Oaxaca decomposition for
linear regression models. The Stata Journal 8(4): 453-479. [Working
paper version available from: {browse "http://ideas.repec.org/p/ets/wpaper/5.html"}]
{phang} Firpo, Sergio, Fortin, Nicole M. and Lemieux, Tomas (2018). Decomposing Wage Distributions Using Recentered Influence Function Regressions
Econometrics, 6(2)28.
{marker Acknowledgments}
{title: Acknowledgments}
{pstd}
The program is based on the Firpo, Fortin and Lemiux (2018). This paper describes the use of RIF functions for the analysis of wage distributions between
two groups, in combination with a reweighting strategy. {break}
This program relies on user written program -oaxaca- of Ben Jann to implement the decompositions. {break}
RIF variables are estimated using the egen addon "rifvar".{break}
All Errors are my own.
{marker Author}{...}
{title:Author}
{pstd}
Fernando Rios-Avila{break}
Levy Economics Institute of Bard College{break}
Blithewood-Bard College{break}
Annandale-on-Hudson, NY{break}
friosavi@levy.org
{title:Also see}
{p 4 13 2}
Online: help for {helpb oaxaca}, {helpb logit}, {helpb probit},
{helpb rifvar}.