It doesn't work because it is illegal.
Look at the on-line help again.
You can go
forval i = 2/3 {
local min_int "5 10"
foreach x of local min_int {
...
}
}
or you can go
forval i = 2/3 {
foreach x in 5 10 {
...
}
}
but what you have is neither one thing nor
the other.
Nick
[email protected]
Mosca, Ilaria
> I just tried, but even this does not seem to work.
>
> forvalues i=2/3 {
> local min_int "5 10"
> foreach x of min_int {
> gen extratime1`i'=time<=`x'
> gen extratimepop1`i'= extratime1`i'*popperc
> bys category: table extratimepop1`i',c(sum popperc)
> }
> }
>
> Now I get the following message:
>
> invalid syntax
> r(198);
>
*
* 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/