Defining yearly dummy variables

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

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 5:31 am

Hi, everybody,
I'm quite new to EViews, so I'm sorry if ask a dumb question. I write my master thesis and I have to do a stacked cross-sectional regression (4 regressors) on a pool of yearly mutual fund data (148 mutual funds and 17 years in total). In order to capture some yearly effect I need to introduce about 17 dummies for the years in the regression equation. Can somebody explain me step by step how can I do this in EViews. I've already tried it but it seems that I do something wrong. I also don't find a suitable topic in this forum.
Thanx a lot. Steven.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Defining yearly dummy variables

Postby startz » Thu Apr 23, 2009 5:57 am

Hi, everybody,
I'm quite new to EViews, so I'm sorry if ask a dumb question. I write my master thesis and I have to do a stacked cross-sectional regression (4 regressors) on a pool of yearly mutual fund data (148 mutual funds and 17 years in total). In order to capture some yearly effect I need to introduce about 17 dummies for the years in the regression equation. Can somebody explain me step by step how can I do this in EViews. I've already tried it but it seems that I do something wrong. I also don't find a suitable topic in this forum.
Thanx a lot. Steven.
One approach is to include

Code: Select all

@expand(@year)
in the regression.

Another approach is to define all the dummies manually

Code: Select all

series d70=@recode(@year=1970,1,0) series d71=@recode(@year=1971,1,0)

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Re: Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 7:38 am

Hi, everybody,
I'm quite new to EViews, so I'm sorry if ask a dumb question. I write my master thesis and I have to do a stacked cross-sectional regression (4 regressors) on a pool of yearly mutual fund data (148 mutual funds and 17 years in total). In order to capture some yearly effect I need to introduce about 17 dummies for the years in the regression equation. Can somebody explain me step by step how can I do this in EViews. I've already tried it but it seems that I do something wrong. I also don't find a suitable topic in this forum.
Thanx a lot. Steven.
One approach is to include

Code: Select all

@expand(@year)
in the regression.

Another approach is to define all the dummies manually

Code: Select all

series d70=@recode(@year=1970,1,0) series d71=@recode(@year=1971,1,0)
Hi, startz, thank You for the quick reply.
To the first approach I get a message from EViews: @expand is not defined!
MY r.h. s. of the regression looks like : RET?(-1) (RET?(-1))^2 NMF?(-1) LOG(FVOL?(-1)) LOG(AGE?(-1)) @EXPAND(@YEAR),
i.e. five regressors plus dummies.

If I use the second approach where should I type the Code (Genr, Estimate)?
Thank You very much. Steven

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Defining yearly dummy variables

Postby startz » Thu Apr 23, 2009 7:41 am

Hi, startz, thank You for the quick reply.
To the first approach I get a message from EViews: @expand is not defined!
MY r.h. s. of the regression looks like : RET?(-1) (RET?(-1))^2 NMF?(-1) LOG(FVOL?(-1)) LOG(AGE?(-1)) @EXPAND(@YEAR),
i.e. five regressors plus dummies.

If I use the second approach where should I type the Code (Genr, Estimate)?
Thank You very much. Steven
What version of EViews are you using?

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Re: Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 7:53 am

My EViews is 3.1 Student version :?

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Defining yearly dummy variables

Postby startz » Thu Apr 23, 2009 8:02 am

My EViews is 3.1 Student version :?
You probably don't have the @expand feature and may not have @recode either. You can do something like

Code: Select all

genr d90=0 genr d91=0 smpl 90 90 d90=1 smpl 91 91 d91=1

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Re: Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 8:06 am

Do You think the first approach will work in EViews 5? Which function should I use in EViews 5 i. o. to implement the second approach?

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Defining yearly dummy variables

Postby startz » Thu Apr 23, 2009 8:09 am

Do You think the first approach will work in EViews 5? Which function should I use in EViews 5 i. o. to implement the second approach?
You'll have to check with tech support (which does monitor this board) to find out which version has which features. But even doing it the "hard way" is only 10 minutes work.

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Re: Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 8:22 am

Do You think the first approach will work in EViews 5? Which function should I use in EViews 5 i. o. to implement the second approach?
You'll have to check with tech support (which does monitor this board) to find out which version has which features. But even doing it the "hard way" is only 10 minutes work.
O.K. I tried it the "hard way" and I get the message "Near singular matrix". Looks like my dummies explain some of the regressors because I don't have an interceipt, or is there some other reason for this message?

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Defining yearly dummy variables

Postby startz » Thu Apr 23, 2009 8:33 am

Do You think the first approach will work in EViews 5? Which function should I use in EViews 5 i. o. to implement the second approach?
You'll have to check with tech support (which does monitor this board) to find out which version has which features. But even doing it the "hard way" is only 10 minutes work.
O.K. I tried it the "hard way" and I get the message "Near singular matrix". Looks like my dummies explain some of the regressors because I don't have an interceipt, or is there some other reason for this message?
Check to be sure you reset the sample to include all the data. If that doesn't do it, you might want to post your workfile, including the equation you have estimated, to see if someone can take a look.

suneco
Posts: 6
Joined: Thu Apr 23, 2009 5:06 am

Re: Defining yearly dummy variables

Postby suneco » Thu Apr 23, 2009 8:40 am

O.K. thank You very much :)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests