Estimate binary choice model with discrete endogenous regressor via special reg > ressor method
sspecialreg depvar specreg [if exp] [in range] , endog(varlist) iv(varlist) [ exog(varlist) hetero hetv(varlist) kdens trim(real) winsor bs bsreps(integer) ]
sspecialreg estimates a binary choice model that includes one or more endogenous regressors using Lewbel's (2000) 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 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.
This method has advantages over the linear probability model (estimated with OL > S 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 m > aximum 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 sspec > ialreg. 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.
endog(varlist) is a required option. It provides the names of one or more endogenous regressors.
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.
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.
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.
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.
. ssc install bcuse
. bcuse sspecialreg_sample
. sspecialreg D3 ageh, trim(5) kdens exog(whiteh married) endog(homeowner) iv(fstamp welfare)
. sspecialreg D3 ageh, trim(5) bs exog(whiteh married) endog(homeowner) iv(fstamp welfare)
Development of this routine is based on code written by Yingying Dong. Implemen > tation 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 > participants in the 2012 German Stata Users Meetings and the 2012 Stata Confere > nce for their helpful comments.
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., 2012. A Simple Estimator for Binary Choice Models with Endogenous Regressors. Forthcoming, Econometric Reviews. 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. Forthcoming, Canadian Journal of Economics. 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.
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
Christopher F Baum, Boston College, USA email@example.com