Dear all,
I'm writing my thesis and have been stuck for a while now. I have problems on running the fixed model regression with dummy variables. My regression has the dependend variable profit (PRO), and 3 independend variables leverage (LEV), size (SIZ) and investment ratio (INV). I also want to include 2 types of dummy variables: one that controls for the industry and one for the country the firm is from.
I've created a workfile with balanced panel data, imported the data from excel by quick--> empty group and than tried to run the regression. Quick estimate equation, filled in: pro c lev siz inv , changed the cross section in panel options from none to fixed.
An error appeared: insufficient number of observations. What does this mean and how do I solve this problem?
Another problem is that I don't know how to put in the dummy variables. ( Dummy=1 if industry= basic material, dummy=0 if industry is not basic material for example)
Hope my questions make sense and someone could help me with these problems.
Cheers!
P.s. I put the workfile in the attachment to give a clearer view.
How to use a panel data fixed model in eviews
Moderators: EViews Gareth, EViews Moderator
-
stijnzweegers
- Posts: 4
- Joined: Tue May 10, 2011 5:23 am
How to use a panel data fixed model in eviews
- Attachments
-
- eviews.wf1
- (45.13 KiB) Downloaded 391 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: How to use a panel data fixed model in eviews
Your series PRO, LEV, and INV appear to have be incorrectly read in as string variables. For regression purposes these are treated as missings. Since observations with missings are excluded, you ended up with no observations.
If I had to guess from looking at the three series, you are using a comma to indicate a decimal delimiter. You'll have to correct this when you do the importing. You could change the original file to have "." 's instead of ","s. I'm looking into whether there is an easier way to do this on import.
If I had to guess from looking at the three series, you are using a comma to indicate a decimal delimiter. You'll have to correct this when you do the importing. You could change the original file to have "." 's instead of ","s. I'm looking into whether there is an easier way to do this on import.
-
stijnzweegers
- Posts: 4
- Joined: Tue May 10, 2011 5:23 am
Re: How to use a panel data fixed model in eviews
Ahh I see, changed my excel file. Regression works now. Thanks! Only how do I put in the dummy variables for the fixed model?
- Attachments
-
- eviews.wf1
- (53.2 KiB) Downloaded 321 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: How to use a panel data fixed model in eviews
There's something wrong with the workfile you posted. It doesn't open properly in EViews.
That said, when you specify your equation, there will be a Panel Options tab in the dialog where you can tell EViews that you want us to do the fixed effects.
That said, when you specify your equation, there will be a Panel Options tab in the dialog where you can tell EViews that you want us to do the fixed effects.
-
stijnzweegers
- Posts: 4
- Joined: Tue May 10, 2011 5:23 am
Re: How to use a panel data fixed model in eviews
Maybe this time the attachment works properly? (for the record; I'm using Eviews 6)
When I write the equation pro c lev siz inv and choose fixed cross section for panel options, where do I then put in the dummy variables? (I've generated 11 new series for the dummy variables for different countries and industries.)
When I write the equation pro c lev siz inv and choose fixed cross section for panel options, where do I then put in the dummy variables? (I've generated 11 new series for the dummy variables for different countries and industries.)
- Attachments
-
- eviews.wf1
- (105.43 KiB) Downloaded 322 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: How to use a panel data fixed model in eviews
You can use an @expand in the main specification dialog to add your dummies.
The command
equation eq1.LS PRO C LEV SIZ INV @EXPAND(INDUSTRY, @DROPLAST) @EXPAND(COUNTRY, @DROPLAST)
runs the regression that you want (with country and industry dummies relative to the overall constant).
Note that I thought you wanted fixed effects and the workfile structure level, but it appears that your CROSSID is unrelated to the panel structure of your data. If this isn't expected you should look more carefully at your data.
The command
equation eq1.LS PRO C LEV SIZ INV @EXPAND(INDUSTRY, @DROPLAST) @EXPAND(COUNTRY, @DROPLAST)
runs the regression that you want (with country and industry dummies relative to the overall constant).
Note that I thought you wanted fixed effects and the workfile structure level, but it appears that your CROSSID is unrelated to the panel structure of your data. If this isn't expected you should look more carefully at your data.
-
stijnzweegers
- Posts: 4
- Joined: Tue May 10, 2011 5:23 am
Re: How to use a panel data fixed model in eviews
True, my intention is to use fixed effects. I've been looking into my data and workfile structures but I can't seem to find what is wrong in my workfile structure. My cross section ID series and date series are simular to those of example workfiles that I've been looking into.
I noticed that it may be impossible to include dummies for both industries and countries since I'm then adding a third dimension. But when I only include the dummies for industries (which are the most important ones) it still shows an error of near singular matrix. Am I overlooking something?
Thanks for your help so far!
I noticed that it may be impossible to include dummies for both industries and countries since I'm then adding a third dimension. But when I only include the dummies for industries (which are the most important ones) it still shows an error of near singular matrix. Am I overlooking something?
Thanks for your help so far!
Who is online
Users browsing this forum: No registered users and 2 guests
