Page 1 of 1

Creating Dummies for calendar effects

Posted: Mon Apr 23, 2012 11:47 pm
by Sissy
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.

Re: Creating Dummies for calendar effects

Posted: Tue Apr 24, 2012 9:05 am
by EViews Esther
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

Re: Creating Dummies for calendar effects

Posted: Tue Apr 24, 2012 9:48 am
by EViews Esther
Or, more simply

Code: Select all

Series dummy1 = @weekday=7 Series dummy2 = @day(+1)=1

Re: Creating Dummies for calendar effects

Posted: Tue Apr 24, 2012 9:52 am
by Sissy
It works, great ! Thanks a lot. :D