Hello,
I have a problem with !x loop.
Since I have negative values in !x, I cannot produce outputs of val_{!s}_{!y}_{!x} for negative ones.
for !s=1 to 3
for !y=1 to 6
for !x=-6 to 12
series val_{!s}_{!y}_{!x} = @recode(sp{!s}=1, y{!y}({!x}), 0) 'It does not produce outputs for negative !x's.
next
next
next
As a solution, I tried to sum all !x values with a constant number (such as 10), but it did not work. Please see below;
series val_{!s}_{!y}_{!x+10} = @recode(sp{!s}=1, y{!y}({!x}), 0)
I will be happy if someone helps me.
Best
Code: Select all
for !s=1 to 3
for !y=1 to 6
for !x=-6 to 12
series val_{!s}_{!y}_{!x} = @recode(sp{!s}=1, y{!y}({!x}), 0) 'It does not produce outputs for negative !x's.
next
next
next
series val_{!s}_{!y}_{!x+10} = @recode(sp{!s}=1, y{!y}({!x}), 0)