Page 1 of 1
Defining yearly dummy variables
Posted: Thu Apr 23, 2009 5:31 am
by suneco
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.
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 5:57 am
by startz
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
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)
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 7:38 am
by suneco
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
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
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 7:41 am
by startz
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?
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 7:53 am
by suneco
My EViews is 3.1 Student version :?
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:02 am
by startz
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
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:06 am
by suneco
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?
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:09 am
by startz
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.
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:22 am
by suneco
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?
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:33 am
by startz
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.
Re: Defining yearly dummy variables
Posted: Thu Apr 23, 2009 8:40 am
by suneco
O.K. thank You very much :)