Statalist


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

Re: st: breaking execution of Stata


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: breaking execution of Stata
Date   Tue, 6 Oct 2009 10:15:17 -0500

If your file is organized LITERALLY like you said, you could try

forvalues k=1/200 {
  estimation `k'
  if _rc continue, break
}

Otherwise you would have to learn return codes, -capture- and error handling.

It seems to me that running 200 estimations would only make sense in
simulations, for which Stata has its own tools (see -simulate-).

On 10/6/09, Koksal, Bulent <[email protected]> wrote:
> Dear Stata Users,
>
>  I have a Stata do file that is something like the following:
>
>  estimation 1
>  estimation 2
>  .
>  .
>  .
>  estimation 200
>
>
>  Now, I start this do file, and for some reason I want to break the
>  execution. When I hit the Break button on Stata, it only stops the
>  current estimation, and moves to the next one. When I hit the Break
>  button again, it does the same thing, meaning that I have to hit the
>  Break button 200 times to stop the execution.
>
>  Hitting the x on the top right corner is not helpful either. Stata
>  asks "exit stata, are you sure?" I say "yes", but above scenario is
>  repetated. Stata stops only the current estimation and moves on to the
>  next one.
>
>  Is there another way to stop the whole thing? Thanks in advance for any help.
>
>
>  --
>  Bülent Köksal
>
>  *
>  *   For searches and help try:
>  *   http://www.stata.com/help.cgi?search
>  *   http://www.stata.com/support/statalist/faq
>  *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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