Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Stas Kolenikov <skolenik@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: error message about bootstrp |
Date | Sun, 3 Mar 2013 19:21:37 -0600 |
Wu, you are mixing up do-files and ado-files. Once you have defined -program apese- in an ado file (in the directory that -bootstrap- can see, type -adopath- to verify), you should refer to it as -bootstrap: apese- without -do-. -- -- Stas Kolenikov, PhD, PStat (SSC) -- Senior Survey Statistician, Abt SRBI -- Opinions stated in this email are mine only, and do not reflect the position of my employer On Sun, Mar 3, 2013 at 6:40 PM, Wu Zhang <wuzhang50@yahoo.com> wrote: > > Hi folks, > > I did a very simple bootstrap and get the following error: > > time-series operators are not allowed with bootstrap without panels, see tsset > r(198); > > > The BS code is as follows: > > cap program drop apese > program apese, rclass > version 12.0 > capture drop xalphat ehat > reg y x1 x2 x3 > return scalar alphaj=_b[x3] > predict xalphat > predict ehat, residual > gen sdhat=exp(xalphat+ehat)/(1+exp(xalphat+ehat))^2 > sum sdhat > return scalar ape=r(mean) > scalar apej=alphaj*ape > end > > > The running code is: bootstrap apej=r(apej): do apese_bs.do > > > Thanks a lot! > > Wu > > > * > * 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/ * * 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/