Statalist


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

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


From   "Michael Furukawa" <Michael.Furukawa@asu.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Bootstrap marginal effects for two-step IV
Date   Thu, 26 Jul 2007 11:37:26 -0700

Thanks for the helpful suggestions.

I have tried your program exactly (on my own data) but get the following
error message:
'r(mfx)' evaluated to missing in full sample
r(322);

Any thoughts on how to fix this?

-----Original Message-----
From: Austin Nichols [mailto:austinnichols@gmail.com] 
Sent: Wednesday, July 25, 2007 9:12 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Bootstrap marginal effects for two-step IV

Michael Furukawa <Michael.Furukawa@asu.edu>:
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 <Michael.Furukawa@asu.edu> 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/



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