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
Using rdrobust with panel data, error 3301I am using a cleaned, balanced panel on retirement behaviour with Stata 16. One of the questions I'm…
plase helpIf there is anyone who knows how to do the things listed in the next document I'm really happy to he…
How to transform the Datastream Format to Panel Data? Could you help me please?I hope I could transform my data to the format below. There should be four columns and for different…
Leave One Out Cross ValidationHello, I am trying to look for the best n given: set obs 200 gen x = runiform(0,5) gen U = rnorma…
Estimating bias in Endogenous Poisson modelsHi all, the title quite speaks for itself. I am trying to recover how the bias intervenes in the es…
Subscribe to:
Post Comments (Atom)
0 Response to Bootstrap standard errors for a two step model and multiply imputed data
Post a Comment