[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Bootstrap marginal effects for two-step IV

From   "Austin Nichols" <>
Subject   Re: st: Bootstrap marginal effects for two-step IV
Date   Thu, 26 Jul 2007 00:12:14 -0400

Michael Furukawa <>:
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

Here's a fake example to get you started:
use, 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]
bootstrap r(mfx), reps(20) cluster(id): myest

On 7/25/07, Michael Furukawa <> 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:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index