Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Solved--Not sure if -foreach- is best option


From   "Reza C. Daniels" <[email protected]>
To   <[email protected]>
Subject   st: Solved--Not sure if -foreach- is best option
Date   Fri, 2 Feb 2007 13:00:10 +0200

Hi listers,

I think I solved the problem: -forval- instead of -foreach-!

***
forvalues i=1/81 {
 	gen wp`i'=exp`i'/tff`i'
 	gen trev`i'=exp`i'-wp`i'
}
***

Silly me.
Reza

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