Dev
>>> [email protected] 04/05/04 02:16pm >>>
On Mon, 2004-04-05 at 14:13, Dev Vencappa wrote:
> local z "1986 1988 1990"
> foreach x of local z{
> gen XPRI3yr`x'=(XPRI`x'-XPRI`x'-2)
> }
You could try
foreach x of local z {
local y = `x'-2
gen XPRI3yr`x'=(XPRI`x'-XPRI`y')
}
hth, Chris.
*
* 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/