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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: On Bootstrap question |

Date |
Thu, 21 Oct 2004 11:22:54 +0100 |

A problem I can see is that -bootstrap- requires an expression list telling it what it is that -withinyear- leaves behind in memory which it should use, but you don't give one. -bootstrap- in essence is totally in ignorance about which results it should use. A quite different issue is the appropriateness of bootstrapping for time series, if that is what your data are. This has been discussed quite a lot on Statalist in the last few weeks. Nick n.j.cox@durham.ac.uk Chintrakarn, Pandej > Please set aside your time to look at my program. > I try to run the program on bootstraping eventually to > obtain the standard deviation of "att"(average treatement > effect on treated). In addition my att is computed with > controlling for the "year" variable to control for unobserved > time effects. > > Somehow the output reports > command -> withinyear > an error occurred when command was executed on original dataset > please rerun bootstrap and specify the trace option to > see a trace of the commands bootstrap executed > r(198); > > I have no clue what goes wrong with this. > My do-file is the following.. > > adopath + c:\ > bootstrap withinyear, reps(500) saving(c:\results) replace > > My program is version 8.2 (last updated). my > "ado" file is also saved in c:\. > > program define withinyear > version 7.0 > if "`1'" == "?" { > global S_1 "a1" > exit > } > tempvar x y0 > tempname att > capture{ > psmatch2 D1 x1 x2 x3 if year==1999, ate logit out( y) > rename _y `y0' > psmatch2 D1 x1 x2 x3 if year==2000, ate logit out( y) > replace `y0'=_y if year==2000 & _treated==1 > psmatch2 D1 x1 x2 x3 if year==2001, ate logit out( y) > replace `y0'=_y if year==2001 & _treated==1 > psmatch2 D1 x1 x2 x3 if year==2002, ate logit out( y) > replace `y0'=_y if year==2002 & _treated==1 > gen `x'=y -`y0' > summarize `x' > scalar `att'=r(mean) > } > if _rc==0 {post `1' (`att')} > end > * * 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/

- Prev by Date:
**st: RE: graph syntax and dialog box** - Next by Date:
**st: RE: Re: Any way to get around Maxvar problem without upgrading?** - Previous by thread:
**st: RE: graph syntax and dialog box** - Next by thread:
**st: Re:too many variables** - Index(es):

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