Hello,
I’m running a quantile regression using David Powell’s -qregpd- package (SSC) on the 25th, 50th and 75th percentiles of my outcome wb. I am trying to graph the coefficients in a way similar to what coefplot (SSC) does (attached image). I have tried adjusting the code suggested here by Clyde Schechter , but can’t get it right.
The help file says the results are stored in the following way:
I’m running a quantile regression using David Powell’s -qregpd- package (SSC) on the 25th, 50th and 75th percentiles of my outcome wb. I am trying to graph the coefficients in a way similar to what coefplot (SSC) does (attached image). I have tried adjusting the code suggested here by Clyde Schechter , but can’t get it right.
Code:
forvalues i=0.25(0.5)0.75{ qregpd WB COVID2 COVID3 COVID4 econ2 econ3 econ4 food2 food3 emp2 emp3 income2 income3 age mar2 mar3 educ2 educ3 educ4 urban2 under_six2 safety_net2, id(Findid) fix(wave) optimize(mcmc) noisy draws(3000) burn(300) arate(.5) } capture postutil clear tempfile holding postfile handle quantile coefficient using `holding' forvalues i=0.25(0.5)0.75{ qregpd WB COVID2 COVID3 COVID4 econ2 econ3 econ4 food2 food3 emp2 emp3 income2 income3 age mar2 mar3 educ2 educ3 educ4 urban2 under_six2 safety_net2, id(Findid) fix(wave) optimize(mcmc) noisy draws(3000) burn(300) arate(.5) post handle (`i') (_b[COVID2]) } postclose handle use `holding', clear graph hbar coefficient quantile, over(WB)
Code:
qregpd saves the following in e(): Scalars e(N) number of observations Macros e(cmd) "qregpd" e(title) "Quantile Regression for Panel Data" e(indepvars) Righ-hand side variables e(depvar) Left-hand side variable e(gamma) Values on the gamma vector Matrices e(b) Parameter values e(V) Variance-covariance matrix of parameters e(solutions) Parameter values from grid search; may contain multiple solutions. Functions e(sample) marks estimation sample
Comment