help for sspecialreg, xtspecialreg

Estimate binary choice model with discrete endogenous regressor via special regressor method

sspecialreg depvar specreg [if exp] [in range]
, endog(varlist) iv(varlist) [
exog(varlist) hetero hetv(varlist) kdens
trim(real) winsor first ivreg2 bs bsreps(integer) ]

xtspecialreg depvar specreg [if exp] [in range]
, endog(varlist) iv(varlist) [
exog(varlist) hetero hetv(varlist) kdens
trim(real) winsor first xtivreg2 bs bsreps(integer) ]

Description

sspecialreg estimates a binary choice model that includes one or more endogenous
regressors using Lewbel and Dong's (Econometric Reviews, 2015) special regressor method. This assumes that the model
includes a particular 'special regressor', V, that is exogenous and appears additively in the model.
It must be continuously distributed with a large support. A special regressor with thick
tails (greater than Normal kurtosis) will be more useful as a special regressor.
To invoke sspecialreg,
you specify the depvar and the specreg, as well as the required lists of endogenous
regressors and excluded instruments.

xtspecialreg performs the same function in the context of panel data which have
been tsset or xtset.

This method has advantages over the linear probability model (estimated with OLS or IV),
maximum likelihood and control function methods. The latter, as implemented by Stata's
ivprobit, do not handle discrete or limited endogenous regressors. Unlike the maximum
likelihood approach, the special regressor method allows for heteroskedasticity of unknown
form in the model's error process.

A particular case, the simple special regressor method, is implemented by sspecialreg.
Two forms are defined, depending on assumptions made about the distribution of the special
regressor V. In the first form, only the mean of V is assumed to be related to other
covariates. In the second, heteroskedastic form, higher moments of V can depend in
arbitrary, unknown ways on the other covariates.

Two forms of the density estimator are available in sspecialreg: one based on a
standard kernel density approach, making use of Jann's kdens, and the other
based on the 'sorted data density' approach of Lewbel and Schennach (2007).

Just as in a probit or ivprobit model, the quantities of interest are not
the estimated coefficients, but rather the marginal effects, which are derived from
the average index function proposed by Lewbel, Dong and Yang (2012). Estimates of the
precision of the marginal effects are derived by bootstrapping, and sspecialreg
has options to specify that bootstrap standard errors should be computed. To reproduce
results, use set seed before giving this command.

Options

endog(varlist) is a required option. It provides the names
of one or more endogenous regressors. This and other varlists do not allow factor variables
nor time series operators. However, a flaw in earlier versions which did not properly handle
hyphenated varlists has been corrected.

iv(varlist) is a required option. It provides the names
of one or more excluded instruments. To satisfy the order condition for identification,
there must be at least as many variables listed as there are in the endog() option.

exog(varlist) may be used to provide the names
of one or more included exogenous variables.

hetero specifies that the heteroskedastic form of the model should be
estimated.

hetv(varlist) may be used to provide the names
of one or more variables assumed to play a role in the heteroskedasticity of the
special regressor V. These might include, for instance, squares and cross products
of some of the exogenous regressors in the model. The use of hetv implies hetero.

kdens specifies that the kernel density estimator should be used, rather
than the default sorted data density estimator. The kdens package from SSC must
be installed.

trim(real) specifies that to ensure adequate support, the data are
to be trimmed by a specified percentage, such as 2.5.

winsor specifies that the data are to be winsorized at the points specified
by the trim() option. You must specify both trim() and winsor.

first specifies that the first stage regression estimates should be displayed.

ivreg2 specifies that the instrumental variables estimation should be performed
with ivreg2 rather than ivregress. This requires that the ivreg2 and ranktest packages from
the SSC archive are installed. If this option is combined with the first option, the additional
diagnostics available in ivreg2 are presented, including tests for weak instruments,
underidentification, etc.

xtivreg2 specifies that the instrumental variables estimation should be performed
with xtivreg2,fe rather than xtivreg,fe. This requires that the xtivreg2, ivreg2 and
ranktest packages from the SSC archive are installed. If this option is combined with
the first option, the additional diagnostics available in xtivreg2 are presented,
including tests for weak instruments, underidentification, etc.

bs specifies that bootstrap standard errors are to be computed for the
marginal effects.

bsreps(integer) specifies the number of bootstrap replications to be
computed. The default value is 10. Computation of a large number of bootstrap replications
may be very time-consuming.

Saved results

sspecialreg saves the estimated coefficients and VCE of the instrumental variables
regression if the bs option is not specified. If the bs option is specified,
the estimated marginal effects and their VCE are saved in e(b) and e(V), respectively,
allowing the use of postestimation commands such as test and lincom.

Examples

. ssc install bcuse

. bcuse sspecialreg_sample

. local exog whiteh married child educat

. local iv fstamp welfare resproptax

. sspecialreg D3 ageh, trim(5) kdens exog(`exog') endog(logfinc homeowner) iv(`iv')

. sspecialreg D3 ageh, trim(5) bs exog(`exog') endog(logfinc homeowner) iv(`iv')

. g newpid=mod(_n,1000)

. bys newpid: g tee=_n

. xtset newpid tee

. xtspecialreg D3 ageh, trim(5) kdens exog(`exog') endog(homeowner) iv(`iv')

. xtspecialreg D3 ageh, trim(5) bs exog(`exog') endog(homeowner) iv(`iv')

Acknowledgements

Development of the sspecialreg routine is based on code written by Yingying Dong.
Thanks to Arthur Lewbel for clarifying the modifications needed in a panel data
setting. Implementation of a much faster version of the sorted data density estimator
was provided by Ben Jann. Jann's kdens routine is used to provide the kernel density
estimates. Thanks to Christophe Bontemps for pointing out an error in the AIF code
(corrected in v1.1.6). Thanks also to participants in the 2012 German Stata Users Meetings,
the 2012 Stata Conference and Manuel Denzer for their helpful comments.

References

Baum, CF, Dong, Y., Lewbel, A., Yang, T., 2012. Binary Choice Models with
Endogenous Regressors. http://repec.org/san2012/baum.san2012.pdf.

Dong, Y. and Lewbel, A., 2015. A Simple Estimator for Binary Choice Models with
Endogenous Regressors. Econometric Reviews, 34, 1-2, 82-105.
http://fmwww.bc.edu/EC-P/wp604.pdf.

Lewbel, A., 2000. Semiparametric Qualitative Response Model Estimation with Unknown
Heteroskedasticity or Instrumental Variables. Journal of Econometrics, 97, 145-177.

Lewbel, A., 2012. An Overview of the Special Regressor Method.
http://fmwww.bc.edu/EC-P/wp810.pdf.

Lewbel, A., Dong, Y., Yang, T., 2012. Comparing features of Convenient Estimators
for Binary Choice Models With Endogenous Regressors. Canadian Journal
of Economics, 45:3, 2012. Working paper version available from
http://fmwww.bc.edu/EC-P/wp789.pdf.

Lewbel, A. and Schennach, S., 2007. A Simple Ordered Data Estimator for Inverse
Density Weighted Functions. Journal of Econometrics, 186, 189-211.

Citation

sspecialreg is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Baum, CF, 2012.
sspecialreg: Stata module to estimate binary choice model with discrete endogenous regressor via special regressor method.
http://ideas.repec.org/c/boc/bocode/s457546.html

Author

Christopher F Baum, Boston College, USA

baum@bc.edu