use @expand by specific years, and replicate trend
Posted: Wed Apr 19, 2017 8:54 am
Hi for all,
1/i have monthly data from 1998m02 2007m09, i would like to have dummy @month=1...@month=12 for the years 2000m02 2003m07 and for 2000m01 2003m012, i have use:
show @expand(@recode(@year(@month>=2)>=2000 or @year(@month<=7)<=2003 ,1,0)) and
show @expand(@recode(@year(@month>=1)>=2000 or @year(@month<=12)<=2003 ,1,0)) but it not give my all @month=1...@month=12.
2/ i would like to replicate trend by some specific date in the same series: (use smpl every time for large data make long time), i have use @recode for all the date but it not gives me the result.
series multi_trend=@recode(@before("2003m01") or @during("2003m01 2006m12") or @after("2007m01"), @trend+1,0)
from 1998m02 to 2002m12 take 1 2 3...
from 2003m01 2006m12 take 1 2 3...
from 2007m01 at last take 1 2 3...
i have make some effort the read the tutorial and some function but no idea. Thanks in Advance.
1/i have monthly data from 1998m02 2007m09, i would like to have dummy @month=1...@month=12 for the years 2000m02 2003m07 and for 2000m01 2003m012, i have use:
show @expand(@recode(@year(@month>=2)>=2000 or @year(@month<=7)<=2003 ,1,0)) and
show @expand(@recode(@year(@month>=1)>=2000 or @year(@month<=12)<=2003 ,1,0)) but it not give my all @month=1...@month=12.
2/ i would like to replicate trend by some specific date in the same series: (use smpl every time for large data make long time), i have use @recode for all the date but it not gives me the result.
series multi_trend=@recode(@before("2003m01") or @during("2003m01 2006m12") or @after("2007m01"), @trend+1,0)
from 1998m02 to 2002m12 take 1 2 3...
from 2003m01 2006m12 take 1 2 3...
from 2007m01 at last take 1 2 3...
i have make some effort the read the tutorial and some function but no idea. Thanks in Advance.