Page 1 of 1

seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 9:51 am
by ch2324
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.

Re: seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 11:33 am
by EViews Gareth

Code: Select all

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

Re: seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 1:14 pm
by ch2324
1) :D
2) and for my second question. :roll:

Re: seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 2:36 pm
by EViews Gareth
Change the 7 to 14.

Re: seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 11:49 pm
by ch2324
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.

Re: seasonal dummy for weekly data s=52

Posted: Sun Feb 21, 2016 11:51 pm
by EViews Gareth

Code: Select all

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

Re: seasonal dummy for weekly data s=52

Posted: Mon Feb 22, 2016 11:49 am
by ch2324
many thanks! :D