Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Austin Nichols <austinnichols@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Stata's two-step treatreg command |

Date |
Tue, 21 May 2013 10:54:27 -0400 |

Bob Reed <bob.reed@canterbury.ac.nz> You might also search the Statalist archives for the control function form of the 2-step version of -treatreg- and find: http://www.stata.com/statalist/archive/2007-04/msg00418.html For -esta- and -esto- in that post, read -esttab- and -eststo- now; both are part of -estout- on SSC. Procedure 18.1 from Wooldridge 2002 (Econometric Analysis of Cross Section and Panel Data, 1st edition) is the other demonstrated method, which tends to work better in simulations with even minor violations of the -treatreg- assumptions. On Mon, May 20, 2013 at 8:27 AM, Steve Samuels <sjsamuels@gmail.com> wrote: > > > Bob: > > You are getting "two-step" mixed up with two-stage least squares. Adding y2hat to the > regression does not produce the two-step estimator. For the correct > terms to add, see pp. 2267 and 2268 of the Stata 12 Manual entry for > -treatreg-. > > Steve > > On May 17, 2013, at 8:44 PM, Bob Reed wrote: > > Hi, I'm trying to do some simulations where I reproduce the results from Stata's treatreg command (two-step). I get very close, but I can't reproduce the results exactly. > > Can somebody tell me if this is just rounding error, or is the code below doing something wrong? > > Thanks! > > Bob Reed > > PS. The code below does not induce any correlation between the error terms in the primary and selection equations. I will get to that after I can figure out exactly how treatreg calculates its estimates. > > ------------------------------------ > clear > set obs 1000 > set seed 50 > generate e1 = rnormal() > generate e2 = rnormal() > generate x1 = rnormal() > generate x2 = rnormal() > generate y2star = x1 + x2 + e2 > generate y2 = 0 > replace y2 = 1 if y2star>=0 > /* y2 is the treatment indicator */ > generate y1 = x1 + y2 + e1 > probit y2 x1 x2 > predict y2hat > /* This command generates the results I want to reproduce */ > treatreg y1 x1, twostep treat(y2 = x1 x2) > /* According to my understanding of treatreg, this OLS equation should */ > /* reproduce treatreg's twostep estimates of the treatment effect */ > regress y1 x1 y2hat * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: Homogeneity of ordinal Variabel***From:*"Meulemann Max" <mmeulemann@ethz.ch>

**References**:**st: Stata's two-step treatreg command***From:*Bob Reed <bob.reed@canterbury.ac.nz>

**Re: st: Stata's two-step treatreg command***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: Need help for calculation across observations within variable** - Next by Date:
**st: Homogeneity of ordinal Variabel** - Previous by thread:
**Re: st: Stata's two-step treatreg command** - Next by thread:
**st: Homogeneity of ordinal Variabel** - Index(es):