Michael Furukawa <[email protected]>:
The -bootstrap- help file is a good starting point--but you might also
want to read
"Instrumental variables, bootstrapping, and generalized linear models"
by James Hardin, Henrik Schmiediche, and Raymond Carroll (see
http://www.stata-journal.com/abstracts/st0049.pdf)
Here's a fake example to get you started:
use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz.dta, clear
g id=_n
g frac=hours/52/100
cap prog drop myest
prog myest, rclass
reg educ age kidslt6 kidsge6 city moth fath
cap drop r
predict r, resid
glm frac educ age kidslt6 kidsge6 city r, link(logit) fam(bin)
mfx, var(educ)
mat b=e(Xmfx_dydx)
return scalar mfx=b[1,1]
end
bootstrap r(mfx), reps(20) cluster(id): myest
On 7/25/07, Michael Furukawa <[email protected]> wrote:
Dear Statalisters:
I am estimating a fractional logit with a continuous endogenous variable
by two-step IV estimation, following Wooldridge (2005)
regress endog $rhs $iv, robust cluster(id)
predict r, resid
glm y $rhs endog r, link(logit) fam(bin) robust cluster(id)
mfx, var(endog)
I am interested in bootstrapping the standard errors for the marginal
effects, can anyone share code that might do this?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/