Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: How to prevent break in .do file when no observations


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: How to prevent break in .do file when no observations
Date   Mon, 11 Apr 2011 15:50:58 +0100 (BST)

--- On 4/11/11 10:36 AM, Paul O'Brien wrote:
> > Stata ends an do-file if there are no observations:
> > 
> > . table agecatkt31 if primary == "Other chemical"
> > & ffy==1, row
> > no observations
> > r(2000);
> > 
> > can i prevent the .do file breaking when there are no
> > observations?

--- On Mon, 11/4/11, Richard Goldstein wrote:
> look at the nostop option (-help do-)

Also see -help capture-. With -capture- you can identify
individual commands for which you want to ignore error
messages, which I would consider safer than a generic
-nostop-.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index