Statalist


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

st: RE: AW: forvalues i = 0(.05).15


From   David Airey <[email protected]>
To   Statalist <[email protected]>
Subject   st: RE: AW: forvalues i = 0(.05).15
Date   Mon, 9 Nov 2009 14:07:27 -0600

.



-help forvalues- should probably carry a warning regarding the hazard
highlighted by David, particularly given the fact that it advocates "...a
loop over noninteger values" in its last example...



HTH
Martin

True, especially because the issue that bit me bit Stata: see the output misses 38! See below.

Thanks Nick and Martin.

-Dave

. forvalues x = 31.3 31.6:38 {
  2. display `x'
  3. }
31.3
31.6
31.9
32.2
32.5
32.8
33.1
33.4
33.7
34
34.3
34.6
34.9
35.2
35.5
35.8
36.1
36.4
36.7
37
37.3
37.6
37.9


*
*   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