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

RE: st: Using forval when one variable is not incremented


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Using forval when one variable is not incremented
Date   Wed, 13 Aug 2003 10:59:00 +0100

Philippe van Kerm answered Deborah Garvey: 

> Here is a suggestion. See Nick Cox's columns in the Stata 
> Journal for more 
> on this and similar issues.
> 
> The trick is to initialise a local macro containing the 
> list of cpi's, and 
> access each of them iteratively in the loop using a "word # 
> of" macro 
> extended function. 
> 
> 
>   ** initialise the list of cpis separated by blanks;
>  
>   loc cpis "0.aaaa 0.bbbbb ... 0.887788779 ...";
>   loc j 1;
> 

Thanks for the plug. The most pertinent specific 
reference is 

Problems with lists. Stata Journal 3(2): 185-202 (2003) 

Nick 
n.j.cox@durham.ac.uk 

P.S. my guess is that CPI means "Consumer Price Index". 
I am impressed that economists can now measure this to 
a precision of 1 part in a billion. 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index