Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: bootstrap two-stage logit

From   xueliansharon <>
Subject   st: bootstrap two-stage logit
Date   Wed, 11 May 2011 07:41:25 -0700 (PDT)


I want to estimate a logit model with one continuous endogenous explanatory
variable (educ), I have two instruments (moth and fath) in hand to address
the endogeneity, so I would like to use two-stage IV logit estimation. I
want to use bootstrap to return the point estimates of the two-stage logit
model and their bootstrap standard errors.

The following are my codes, but the returned bootstrapped standard errors
are the same to the SEs of second-stage logit model (which is wrong and
needs to corrected by bootstrap), i.e. the bootstrap didn't make any
difference in correcting the SEs of second-stage logit model. Can anyone
help me to figure out the mistake in the program? Many thanks!!!

use, clear
capture program drop myprog
prog myprog, eclass
 regress educ age kidslt6 kidsge6 city moth fath
 capture drop peduc
 predict peduc,xb
 logit inlf peduc age kidslt6 kidsge6 city
	tempvar touse
	tempname b V
	matrix `b'=e(b)
	matrix `V'=e(V)

	quietly gen byte `touse' = e(sample)
	ereturn post `b' `V', esample(`touse')
	ereturn local cmd "myprog"
bootstrap, reps(20) seed(1014): myprog


View this message in context:
Sent from the Statalist mailing list archive at
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index