命令简介
genqreg – generalized quantile regression in Stata:
genqreg implements the generalized quantile estimator developed in Powell (2016). The generalized quantile estimator addresses a fundamental problem posed by traditional quantile estimators: inclusion of additional covariates alters the interpretation of the estimated coefficient on the treatment variable. The generalized quantile estimator implemented by genqreg addresses this problem and produces unconditional quantile treatment effects even in the presence of additional control variables. genqreg also allows for endogeneity and inclusion of additional instruments, and inclusion of additional “proneness” variables.
As estimation can be numerically challenging, and recovering standard errors difficult, genqreg provides a number of alternative estimation methods. One can estimate via grid search, Markov chain Monte Carlo (MCMC), or Nelder-Mead numerical optimization. To use MCMC, the user must first install the AMCMC package (ssc install amcmc) .
命令安装
ssc install genqreg,replace ssc install moremata,replace
命令示范
Robust quantile regression with qreg:
Code:
. use http://fmwww.bc.edu/repec/bocode/j/jtpa.dta, clear . keep if sex == 1 . qreg earnings training hsorged black hispanic married wkless13 class_tr ojt_jsa age2225 age2629 age3035 age3644 age4554 f2sms, q(85) vce(robust)
Same as above, with genqreg:
Code:
. genqreg earnings training hsorged black hispanic married wkless13 class_tr ojt_jsa age2225 age2629 age3035 age3644 age4554 f2sms, q(85)
Same, estimation via MCMC:
Code:
. genqreg earnings training hsorged black hispanic married wkless13 class_tr ojt_jsa age2225 age2629 age3035 age3644 age4554 f2sms, /// q(85) optimize(mcmc) noisy draws(10000) burn(3000) arate(.5)
Specifying control variables as proness variables, with an instrument, estimation using grid-search:
Code:
genqreg earnings training, q(85) instrument(assignmt) proneness(hsorged black hispanic married wkless13 class_tr ojt_jsa age2225 age2629 age3035 age3644 age4554 f2sms) /// optimize(grid) min1(1000) max1(3500) intvl1(50)
参考文献
Chernozhukov, Victor and Christian Hansen. 2008. Instrumental variable quantile regression: A robust inference approach. Journal of Econometrics 379-98.
Powell, David. 2016. Quantile Treatment Effects in the Presence of Covariates. RAND Labor and Population Working Paper.
Powell, David. 2015. Quantile Regression with Nonadditive Fixed Effects. RAND Labor and Population Working Paper.
联系方式
Matthew J. Baker, Email: matthew.baker@hunter.cuny.edu
David Powell, Email: dpowell@rand.org
Travis Smith, Email: tasmith@uga.edu