*! version 1.1 Fernando Rios-Avila July 2019
help rifsureg2

Title

rifsureg2 -- Seemingly unrelated recentered influence
function regression

Syntax

rifsureg2 depvar [indepvars] [if] [in] [weight],
rif(RIF_options) [options]

options

* rif(RIF_options) specify a list of statistics for which
recentered influence functions (RIFs) will be estimated, including their statistic options, separated by a comma; see rifvar() for specifics

retain(str) specify a prefix for a new variable where the
generated RIFs will be stored, based on the sample used in the regression;
by default, new variables are stored as __depvar_m#

replace when retain() is specified,
overwrite the variable retain(str) if it already exists

over(varname) indicate a variable over which the RIF will be
estimated; this can be understood as a partial conditional RIF; when the variable
used is binomial, the regression can be seen as the ordinary least-squares
alternative to Oaxaca-Blinder decomposition

rwlogit(varlist) specify the logit regression for the
estimation of the reweighting factors; the variable used in over() is
used as the dependent variable;
this can be used to obtain estimates akin to treatment effects under the assumption of exogeneity

rwprobit(varlist) specify the probit regression for the
estimation of the reweighting factors; the variable used in over() is
used as the dependent variable;
this can be used to obtain estimates akin to treatment effects under the assumption of exogeneity

rwmlogit(varlist) specify the mlogit regression for the
estimation of the reweighting factors; the variable used in over() is
used as the dependent variable;
this can be used to obtain estimates akin to multivalued treatment effects under
the assumption of exogeneity; only average treatment effects (ate) are allowed

rwmprobit(varlist) specify the mprobit regression for the
estimation of the reweighting factors; the variable used in over() is
used as the dependent variable;
this can be used to obtain estimates akin to multivalued treatment effects under
the assumption of exogeneity; only average treatment effects (ate) are
allowed

[ate|att|atu] indicate which estimator will be obtained using
the reweighted factors; default is to estimate the average treatment
effect (ate);
one can also specify to obtain the treatment effect on the treated (att) or
on the untreated (atu)

sureg_options most options in sureg can be used but have not been extensively tested

old This option request using the older rifvar function (for replication purposes).

fweights and aweights are allowed. When using
rwlogit(varlist), rwprobit(varlist), rwmlogit(varlist), or
rwmprobit(varlist), weights are used as aweights; see
weight.

* rif() is required.

Description

rifsureg2 is a wrapper command that uses the capabilities of sureg
to estimate simultaneous RIF regressions.

The command fits the RIF regression models in two steps. First, it estimates
the RIF for all the statistics of interest using rifvar().
Second, it uses the estimated RIF as dependent variable and fits the
simultaneous RIF models using sureg. Using a similar syntax to
rifhdreg, rifsureg2 estimates simultaneous regressions for
treatment effects by using the option over() in combination with
rwlogit() or rwprobit() after selecting the estimation of the type
of treatment effects to be estimated (Firpo and Pinto 2016).

Because the command is a wrapper for sureg, most options from
sureg are available but have not been fully tested.

For the correct estimation of bootstrap standard errors, it is recommended to
use the bootstrap prefix to apply the bootstrap through the whole
estimation process.

rifsureg2 typed without arguments replays the last results.

Examples

. webuse cattaneo2

Simultaneous RIF regressions across quantiles.

. rifsureg2 bweight mbsmoke prenatal1 mmarried mage fbaby, rif(q(10),q(90),std)

Simultaneous RIF regressions across quantiles. Treatment effects of
smoking.

. rifsureg2 bweight mbsmoke prenatal1 mmarried mage fbaby, rif(q(10),q(90),std) over(mbsmoke)

Simultaneous RIF regressions across quantiles. Treatment effects of
smoking. Using inverse-probability weighting with ate.

. rifsureg2 bweight mbsmoke prenatal1 mmarried mage fbaby, rif(q(10),q(90),std) over(mbsmoke) rwlogit(prenatal1 mmarried mage fbaby) ate

Simultaneous RIF regressions across quantiles. Treatment effects of
smoking. Using inverse-probability weighting with ate. Bootstrapped
standard errors.

. bootstrap: rifsureg2 bweight mbsmoke prenatal1 mmarried mage fbaby, rif(q(10),q(90),std) over(mbsmoke) rwlogit(prenatal1 mmarried mage fbaby) ate

Acknowledgments

This command is based on the community-contributed command rifreg.

RIF variables are estimated using the egen add-on rifvar(). An
intuitive description of RIF regressions is provided in Rios-Avila (2020).

All errors are my own.

References

Firpo, S. P., and C. Pinto. 2016. Identification and estimation of
distributional impacts of interventions using changes in inequality measures.
Journal of Applied Econometrics 31: 457-486.
https://doi.org/10.1002/jae.2448.

Rios-Avila, F. 2020. Recentered influence functions (RIFs) in Stata: RIF regression and RIF decomposition.
Stata Journal, 20(1), 51-94. https://doi.org/10.1177/1536867X20909690.

Author

Fernando Rios-Avila

Levy Economics Institute of Bard College

Annandale-on-Hudson, NY

friosavi@levy.org

Also see

Help: rifreg, reghdfe, oaxaca_rif,
rifvar(), rifhdreg, rifsureg, uqreg,
hvar() (if installed), [R] sureg