seas dummy bimonthly s=24, fortnight s=26...

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Mon Mar 14, 2016 5:38 am

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 :)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Mon Mar 14, 2016 8:43 am

There isn't an easy way to do it. What frequency is the workfile?

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Mon Mar 14, 2016 8:50 am

i have 3 wf with three different frequency bimonthly fortnight and trimonthly.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Mon Mar 14, 2016 9:12 am

If they're regular (i.e. each year has exactly 24 observations for bimonthly, 26 for fortnightly and 36 for tri) it is doable:

Code: Select all

show @expand(@mod(@trend,24)+1)
Where you swap out the 24 bit depending on the frequency.

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Mon Mar 14, 2016 10:10 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Mon Mar 14, 2016 10:21 am

No.

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Mon Mar 14, 2016 10:45 am

ok! :)

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Tue Mar 22, 2016 9:06 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Tue Mar 22, 2016 9:22 am

I can't think of a good way to do it with daily data.

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Tue Mar 22, 2016 9:33 am

not for the daily, but for bimonthly, fortnight, and trimonthly.
Last edited by ch2324 on Tue Mar 22, 2016 9:43 am, edited 1 time in total.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Tue Mar 22, 2016 9:37 am

Seems to work for me:

Code: Select all

wfcreate bm 03/05/1973 18/03/2015 show @expand(@mod(@trend,24)+1)

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Tue Mar 22, 2016 10:00 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Tue Mar 22, 2016 10:13 am

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.

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby ch2324 » Tue Mar 22, 2016 10:19 am

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.
Attachments
quandl_seas.wf1
(448.55 KiB) Downloaded 452 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: seas dummy bimonthly s=24, fortnight s=26...

Postby EViews Gareth » Tue Mar 22, 2016 10:24 am

Isn't that irrelevant? What does the order of the variables in the group matter?


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests