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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: code skips based on conditions


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: code skips based on conditions
Date   Thu, 28 Mar 2013 09:42:16 +0100

On Thu, Mar 28, 2013 at 4:28 AM, Darren White wrote:
> I am running some foreach tabulate loops the results of which are accumulat ed by matrix commands. (see code below).
>  I would like skip (at the point *** in the code) to the next level of local levels based on a conditional test of the number
> of observations contained in the scalar e(N) which is returned after each tabulated combination of the foreach variables.
> Have not been able to find anything (or even a lead) that could help me do this.

The -continue- command was created for that purpose: see -help continue-.

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index