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
Help with Merging two Long-Format Datasets (by Creating Person-Year Data)Hi all, I am having some issues merging two datasets that are both in long format. It's a bit compl…
Code to get Beta coefficients in multiple imputation models in Linear regressionWhat's the code to get Beta coefficients in multiple imputation estimate models in Linear regression…
Tab row col formatHi, Is it possible to add or remove digits from row/col options in Tab? For example my first row o…
Fixed effects for Regression DiscontinuityHey all, does anyone has an idea on how to include fixed effects in the rdrobust command? I have a…
interpreting REGHDFE with absorb specificationsHi all, I am using panel data with fixed effect. In checking the robustness of my results, I estimat…
Subscribe to:
Post Comments (Atom)
0 Response to Bootstrap standard errors for a two step model and multiply imputed data
Post a Comment