seasonal dummy regression

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

suterrr
Posts: 4
Joined: Wed Nov 05, 2008 10:27 am

seasonal dummy regression

Postby suterrr » Wed Nov 05, 2008 10:39 am

Hey all!

I have been trying to set up a seasonal dummy regression, however, for some reason it just wont work. Since I am quite new to Eviews, I really do not know if I am already messing up at the beginning or at some later stage of the equation set up.
I am trying to analyze seasonal patterns within ETF (exchange-traded fund) returns over the last 7 years. Basically, I am trying to look for a positive November effect and a negative July effect. Therefore I have monthly returns for each of the years examined. I am now trying to run the following regression

Rt = c + alpha Dt2 + alpha Dt3 + alpha Dt4 +....+alpha Dt12 (5)

Rt stands for the ETF return at time t, the intercept c represents the average return for the month of November and replaces an additional dummy variable in order to avoid the Dummy variable trap. The alpha m (m=2, 3, 4…, 11, 12) represent the difference between the average November return and month m. This time we test for all the Dummy variables to be 0. If the Dummy coefficients turn out to be negative, a November effect would be at hand. The estimation of the coefficients in equation (5) will give an indication as to which months differ in average returns in comparison with average November returns.

Has anyone done this so before and is able to lead me through the creation of such a model?
Thanks for the help!!

Best regards

raph

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

Re: seasonal dummy regression

Postby EViews Gareth » Wed Nov 05, 2008 10:51 am

Assuming you have your data in a monthly workfile, the easiest way to do this is something along the lines of

Code: Select all

ls rt c @expand(@month, @drop(11))
@expand is a special EViews command that lets you automatically create dummy variables in an equation. It will create a dummy variable for every value contained in the series you give it. In this case I've given it the special EViews command, @month which is a series containing the month (running from 1 to 12). The @drop command inside the @expand tells EViews not to create a dummy variable for month 11.

suterrr
Posts: 4
Joined: Wed Nov 05, 2008 10:27 am

Re: seasonal dummy regression

Postby suterrr » Wed Nov 05, 2008 11:51 am

Hi!

Thanks so much for getting back to me that fast!!!! unfortunately i am seeing an error message i have actually ran into several times:

Near singular matrix

Just to make sure, I am trying to get values for each Dummy variable plus the constant c for all of the years tested. So I should have 12 coefficient values for all years ranging btw. 2001 and 2007.

Is there any chance I can send you my Eviews file, so you can take a quick look at it, since I am assuming i have set up something wrong which probably kept me from moving on earlier.

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

Re: seasonal dummy regression

Postby EViews Gareth » Wed Nov 05, 2008 11:53 am

That error message probably means you have fallen into the dummy variable trap.

You can email your workfile to support@eviews.com, but you'll need to include your EViews serial number (available from Help->About EViews)

suterrr
Posts: 4
Joined: Wed Nov 05, 2008 10:27 am

Re: seasonal dummy regression

Postby suterrr » Wed Nov 05, 2008 12:32 pm

hey Gareth!

Great! ill rearrange all my data and send it to you with the serial number as soon as possible!

once again, thanks for helping out that fast!

raph

suterrr
Posts: 4
Joined: Wed Nov 05, 2008 10:27 am

Re: seasonal dummy regression

Postby suterrr » Tue Nov 11, 2008 8:53 am

Gareth!

Unfortunately, I am not in possession of a supported version of Eviews, so I am still struggling to get this dummy regression. if I create 11 dummies (for every month one except none for the month of November) I can run the equation, however, there are no t-stats nor st. err. or prob. displayed. Once I run the equation with 10 dummies, it works but the coefficients obviously differ...do you have any suggestions how i could adjust my model:

ls MoRet c D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D12

thanks!!

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Re: seasonal dummy regression

Postby Kavorka » Mon May 09, 2016 3:57 pm

group dummies @expand(@quarter)

creates quarterly dummy variables in a quarterly time-series file, but these series are automatically named

@QUARTER=1, @QUARTER=2, @QUARTER=3, and @QUARTER=4

How can I rename the groups' individual series to

d1, d2, d3, and d4?

Best
/P

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

Re: seasonal dummy regression

Postby EViews Gareth » Mon May 09, 2016 4:05 pm

Code: Select all

Series d1=@quarter=1

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Re: seasonal dummy regression

Postby Kavorka » Mon May 09, 2016 4:16 pm

Thanks for your rapid answer, I thought I used that exact command before but apparently I did not, I must have misplaced a comma or so. Sorry for taking up your time, but now it works.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests