Hi,
I am a new user to the Stata 11.1 SE
I have run into syntax problems with the - forvalues- command while creating a loop.
My syntax which comes from Stata 9 is the following:
forvalues svy = 1/`max1' {
use "'allsvys'", clear
keep if i==`svy'
}
and I get the following error :
invalid syntax
r(198);
Subsequently, i would also like to run the following syntax (shortened for convenience)
foreach x of local names {
if "`x'"=="lgsmkc" {
display "`x'"
gen row`j'=lgcigc
local j=`j'+1
}
}
Can anyone help?
Gauri
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/