Hello,
I have daily database (spot prices) in my workfile and I would like to create a dummy variable for the end of week and another one for the end of the month. How can I do that in Eviews 7 sv, please ?
Thanks.
Creating Dummies for calendar effects
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Creating Dummies for calendar effects
One simple solution to your problem could be the followings.
Code: Select all
series dummy1 = @recode(@weekday=7,1,0) '=1 if Sundays, =0 otherwise
series temp = @recode(@day=1,1,0)
series dummy2 = temp(+1) '=1 if the end of the month, =0 otherwise
d(noerr) temp
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Creating Dummies for calendar effects
Or, more simply
Code: Select all
Series dummy1 = @weekday=7
Series dummy2 = @day(+1)=1
Re: Creating Dummies for calendar effects
It works, great ! Thanks a lot. :D
Who is online
Users browsing this forum: No registered users and 2 guests
