Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Bootstrap in two-stage models

From   "Dawit Lidia" <>
Subject   RE: st: Bootstrap in two-stage models
Date   Fri, 18 Feb 2005 13:12:37 +0000

Try the following command.   I got it from statacorp Technical Services
representative . It worked for me.

Good luck with your work.

cap prog drop _all
program define bootit

version 8
tempvar lin
probit con   catch  rentdum solfert1  ///
solfert2 sodepth1 sodepth2 lowland lndist1 lnha   ///
meslope meslope2 plotdum lnothplot ///

predict double `lin', xb

capture drop imr
gen double imr = normden(`lin') /norm(`lin')

xtreg lntm12 imr conshare        lnplough lnweed lnvalfert lnseedha
lnothplot rentdum  solfert1 solfert2 ///
sodepth1 sodepth2    lndist1   lnmeslope     plotdum        lowland
intercrop ///
tcrop2-tcrop7 ///


// Need to mark the estimation sample ourselves
// Cheap and fast way is to use -regress-:
qui regress  con conshare  lnplough lnweed lnlandae catch oxtluha oxtluha2
tottluha tlu2 edu status lndistext rentdum reds1 reds3  ///
sodepth1 sodepth2 age age2 lnha meslope  ///
meslope2 lnfwfha fwfha fwf2ha lnmwfha mwfha mwf2ha plotdum ///
lowland lndist1 lntotoutval lnvalfert lnseedha rentdum solfert1 ///
solfert2 lnha lnothplot lndist1  plotdum intercrop ///
lowland tcrop2-tcrop7   lnage lnexp visit ///
edu lnfwfha lnmwfha lnoxtluha lntottluha offfarm conshare

keep if e(sample)
set seed 123456
bootstrap "bootit" _b, reps(500) dots cluster(hhno)  ///


Dear All,

I want to estimate a treatment effect model, a two-stage model with a probit
model in the first and an OLS in the second.

I cannot use the 'treatreg' stata program as some of my hypothesis are
from the classical ones.
So I need to compute the two-step corrected variance-covariance matrix "by

One way to do this is to use the Murphy-Topel correction procedure. (I thank
statalister that provided me his program last month).

Another way (and this is the one I am interested in) is to use bootstrap
Does anyone knows how to implement this method?


This message was sent using IMP, the Internet Messaging Program.

*   For searches and help try:

|  |    |  |  | Inbox

   Get the latest updates from MSN
  Startsiden   |   Min MSN   |   Hotmail   |   Søk   |   Shopping   |   MSN
Messenger   |   Personer & Grupper
Feedback  |  Help
© 2005 Microsoft TERMS OF USE  Privacy Statement  Anti-Spam Policy

 >Note: forwarded message attached.
>Do you Yahoo!?
>  Yahoo! Mail - 250MB free storage. Do more. Manage less.
><< message5.txt >>

Last ned MSN Messenger gratis - Den
korteste veien mellom deg og dine venner

*   For searches and help try:

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