Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: problem with numlist in forvalues


From   "Reardon, Sean F." <[email protected]>
To   <[email protected]>
Subject   st: RE: problem with numlist in forvalues
Date   Fri, 11 Mar 2005 08:31:08 -0800

-forvalues- only allows a few specific types of numlists -- try using
-foreach-

foreach n of numlist 100(100)1000 1000(500)5000 5000(1000)10000 
10000(5000)50000 50000(10000)100000 {

is legal.

see -whelp foreach- and -whelp fovalues-

sean.
_____________________________
 
please note new contact information:
_____________________________
 
sean f. reardon
associate professor of education and (by courtesy) sociology
school of education
485 lasuen mall, #315
stanford university
stanford, ca 94305-3096
650.736.8517 (office phone)
650.725.7412 (office fax)
[email protected]
_____________________________
 
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Daniel
Mueller
Sent: Friday, March 11, 2005 8:23 AM
To: Statalist
Subject: st: problem with numlist in forvalues

I have a longer -numlist- to process with -forvalues-. I 
can't see why the following does not work:

forval n = 100(100)1000 1000(500)5000 5000(1000)10000 
10000(5000)50000 50000(10000)100000 {
invalid syntax
r(198);

-whelp limits- says the limit of a -numlist- is 1,600. I 
have 36 above. And the actual list in my example is even 
longer than that.

Thanks in advance.

Rgds,
Daniel

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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