seasonal dummy for weekly data s=52

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

seasonal dummy for weekly data s=52

Postby ch2324 » Sun Feb 21, 2016 9:51 am

hi every one
1)for monthly s=12 (@expand(@month)) and quarterly s=4(@expand(@quarter)) it's easy to do the seasonal dummy, but how can do this for weekly data?
2)i have seen that this code generate dummy equal 1 for every first week for each month (data weekly), but how can generate dummy for the second week for each month?

Code: Select all

series first = @date < @datefloor(@date,"month") + 7
http://forums.eviews.com/viewtopic.php?f=3&t=10957
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: seasonal dummy for weekly data s=52

Postby EViews Gareth » Sun Feb 21, 2016 11:33 am

Code: Select all

@expand(@datepart(@date, "ww"))

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

Re: seasonal dummy for weekly data s=52

Postby ch2324 » Sun Feb 21, 2016 1:14 pm

1) :D
2) and for my second question. :roll:

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

Re: seasonal dummy for weekly data s=52

Postby EViews Gareth » Sun Feb 21, 2016 2:36 pm

Change the 7 to 14.

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

Re: seasonal dummy for weekly data s=52

Postby ch2324 » Sun Feb 21, 2016 11:49 pm

when i cahange 7 by 14, it will generate dummy for the 1st and second week for every month, but i need dummy=1 just for second week for every month.

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

Re: seasonal dummy for weekly data s=52

Postby EViews Gareth » Sun Feb 21, 2016 11:51 pm

Code: Select all

series first = @date >= @datefloor(@date,"month") + 7 and @date < @datefloor(@date,"month") + 14

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

Re: seasonal dummy for weekly data s=52

Postby ch2324 » Mon Feb 22, 2016 11:49 am

many thanks! :D


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest