Page 1 of 3
seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 5:38 am
by ch2324
hi every one
how can generate dummy for bimonthly (s=24) and fortnight (s=26) and for trimonthly (s=36), i have used @expand(@month) , and @expand(@datepart(@date, "ww")) but doesn't work.
I would highly appreciate if any of you could help me :)
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 8:43 am
by EViews Gareth
There isn't an easy way to do it. What frequency is the workfile?
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 8:50 am
by ch2324
i have 3 wf with three different frequency bimonthly fortnight and trimonthly.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 9:12 am
by EViews Gareth
If they're regular (i.e. each year has
exactly 24 observations for bimonthly, 26 for fortnightly and 36 for tri) it is doable:
Where you swap out the 24 bit depending on the frequency.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 10:10 am
by ch2324
exactly what that i need :D . perfect!
many thanks! Mr Gareth.
it is possible to show the value 1 of dummy in color "green" in the group or in the series?
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 10:21 am
by EViews Gareth
No.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Mon Mar 14, 2016 10:45 am
by ch2324
ok! :)
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 9:06 am
by ch2324
i have data start from 03/05/1973 to 18/03/2016 frequency daily.
problem Mr Gareth i have data for another case not regular in the year for bimonthly fortnight, and trimonthly "the code @expand(@mod(@trend,x)+1)" it not work, same problem with weekly date when i use show @expand(@datepart(@date, "ww")) not work for the first year 1973. have you an idea for this case.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 9:22 am
by EViews Gareth
I can't think of a good way to do it with daily data.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 9:33 am
by ch2324
not for the daily, but for bimonthly, fortnight, and trimonthly.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 9:37 am
by EViews Gareth
Seems to work for me:
Code: Select all
wfcreate bm 03/05/1973 18/03/2015
show @expand(@mod(@trend,24)+1)
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 10:00 am
by ch2324
you have not understand me,
1/05/1973 with (@expand(@mod,24)+1)=9 should take 1 not (@expand(@mod,24)+1)=1 with 1/05/1973 because i have 16 bm in the year of 1973 . but from 1974 to 2016 it will take regular seas dummy.
for example monthly frequency @expand(@month) generate the regular dummy for all years.
1973m5 = @month=5 take 1
1973m6= @month=6 take 1
....etc
1974m1= @month=1....etc
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 10:13 am
by EViews Gareth
You're right, I don't understand.
Surely you want the same period of each year to get the same value for the dummy. That is what this code gives.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 10:19 am
by ch2324
No this code generate dummy for 1/05/1973 = (@expand(@mod(@trend,24)+1)=1 it should be start from (@expand(@mod(@trend,24)+1)=9 for year 1973 you can see in my workfile pageselect bimonthly.
Re: seas dummy bimonthly s=24, fortnight s=26...
Posted: Tue Mar 22, 2016 10:24 am
by EViews Gareth
Isn't that irrelevant? What does the order of the variables in the group matter?