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

st: Using 'For' command


From   "Fraser, Steven" <[email protected]>
To   "Statalist (E-mail)" <[email protected]>
Subject   st: Using 'For' command
Date   Thu, 15 May 2003 10:20:50 -0400

I have a series of variables that start with a particular letter ('l' in
this case).  I would like to generate a new variable that measures the
change in variable over time (I have another variable 'week').

I have tried different variants of the following with little success:

tset week
for l@ : gen l@ret = (([email protected]@)/l.l@)

Any suggestions are greatly appreciated.

Steve Fraser
Dept of Finance
College of Business
Univ of South Florida
(813) 974-9680

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