1st code:
when i substruct 119
from period "1990m1 1997m6" trend will be this -119 -118 -197....-30.
from period "2000m1 2002m12" the code work. trend take 1 2 3....36.
Code: Select all
series t = @recode(@during("1990m1 1997m6") or @during("2000m1 2002m12"), @trend-119, 0)
but if i use this code
Code: Select all
series t = @recode(@during("1990m1 1997m6") or @during("2000m1 2002m12"), @trend, 0)
from period "1990m1 1997m6" the trend will be this 0 1 2 3....89.
from period "2000m1 2002m12"the trend will be this 120 121....155.
i need this:
from 1990m1 1997m6 take 1 2 3 4....
from 1997m7 1999m12 take 0
from 2000m1 2002m12 take 1 2 3 4....
and all other period take 0
2nd code:
if i divided by 2
the first year will be this: 1st month take 0, second take 0, 3rd take 1, 4th take 0, 2, 0, 3, 0, 4, 0, 5.....and so on
Code: Select all
series t = @recode(@mod(@trend,2)=0, @trend/2, 0)
i need this:
1st year: 1990m1 1990m12 take 1 2 3 ... 12
2nd year: 1991m1 1991m12 take 0
3rd year: 1992m1 1992m12 take 1 2 3 ...12
4th year: 1993m1 1993m12 take 0
and so on
i hope that you understand me
could you help me please.