Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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   Eric Booth <ebooth@ppri.tamu.edu>
To   "<statalist@hsphsun2.harvard.edu>" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: How to prevent break in .do file when no observations
Date   Mon, 11 Apr 2011 14:50:19 +0000

<>

Also, try -capture- (see  -help capture-).

- Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
ebooth@ppri.tamu.edu



On Apr 11, 2011, at 9:39 AM, Richard Goldstein wrote:

> look at the nostop option (-help do-)
> 
> Rich
> 
> 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?
>> 
>> thanks,
>> 
>> paul
>> 
>> -------------------------------
>> Dr Paul O'Brien
>> Raymede Clinic
>> Westside Contraceptive Services
>> Central London Community Healthcare
>> Exmoor St
>> London
>> W10 6DZ
>> UK
>> +44 (0)20 8962 4450
> *
> *   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/



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