Dear all,
I am trying to account for sample selection into the selection of female and male wealth. I do that in a two step model. In the first step, I run a probit model and compute the inverse Mills ratio. In the step I incorporate that ratio in my regression. However, I want to bootstrap the aforementioned process in order to have correct estimates. The problem is that I have multiply imputed data (5 times) and even with reps(2) the whole estimation takes age.
I have written the following code and I would like to know if you think it is correctly coded or if you could provide me with some better suggestions on how to approach such problem.
capture program drop qr11a
program define qr11a, rclass
mi estimate, saving(miest,replace) post dots vceok: svy: probit prob1 gender Dage Dage1 Dchild Rown RownI childI /*
*/ Dmar DmarI DmarII marI marII marIII ageI ageII earningsD earningsI if ra0300<61
drop xb_mi phi PHI lambda
mi predict xb_mi using miest
* To calculate the standard normal pdf
g phi=normalden(xb_mi)
* To calculate the standard normal cdf
g PHI=normal(xb_mi)
* and to calculate lambda
g lambda=phi/PHI
mi estimate, post dots vceok: svy: reg nwealtht gender lambda if partner==0 & ra0300<61
return scalar b_g = el(e(b_mi),1,1)
return scalar b_l = el(e(b_mi),1,2)
end
bootstrap b_gender=r(b_g) b_lambda=r(b_l), reps(2) : qr11a
vceok is a command that takes into account the replicate weights of the survey.
Thank you for your help.
Ilias
Related Posts with Bootstrap standard errors for a two step model and multiply imputed data
Converting from long to wide formatDear all, I'm trying to convert from long to wide format: Code: reshape wide _proc_code _proc_eye…
Polygons hidden behind others when creating choropleth map using spmapHi everyone - this is my first ever post on this forum. I've been having a problem using the spmap …
Importing a matrix into stata file: Col numbersDear Statalisters I have a matrix with column names equal numbers, when I run svmat matrix, and Stat…
mtefe with interactive fixed effectsHello everyone! First time poster, long time lurker here I'm working on a project that requires obt…
How to download API data from the Bureau of Labor Statistics?Hi, I would like to download API data from the Bureau of Labor Statistics. Unfortunately and surpri…
Subscribe to:
Post Comments (Atom)
0 Response to Bootstrap standard errors for a two step model and multiply imputed data
Post a Comment