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: Loop question


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Loop question
Date   Fri, 9 Dec 2011 11:16:16 +0000

Use -foreach- instead.

foreach i in 0 0.6 0.7 0.8 0.9 1 1.1

Nick

On 9 Dec 2011, at 11:03, K Jensen <k.x.jensen@gmail.com> wrote:

What is the easiest way of looping through one isolated value and a
more conventional loop over a different range?

Basically, I would like to do something like forvalues i=0 AND
0.6(0.1)1.1 except that this syntax doesn't exist.  I.e. I would like
i to take the values 0, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1
*
*   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