Fixed effects panel regression (LSDVM)

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

chad
Posts: 5
Joined: Wed May 28, 2014 11:55 am

Fixed effects panel regression (LSDVM)

Postby chad » Wed May 28, 2014 12:09 pm

Hi there,

I am a new Eviews user and I am trying to do a simple Least Squares Dummy Variable model. I have attached an example excel: Y is the dependent variable, X1, X2 and X3 are the independent variables. You can also see the dates and "Country" is supposed to define the cross section for three countries. Could you tell me if my data is in correct form in excel to do LSDVM pls?

Thanks
Attachments
test for panel.xlsx
(9.68 KiB) Downloaded 268 times

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

Re: Fixed effects panel regression (LSDVM)

Postby startz » Wed May 28, 2014 1:25 pm

That should work.
Read the file into EViews and see what happens.

chad
Posts: 5
Joined: Wed May 28, 2014 11:55 am

Re: Fixed effects panel regression (LSDVM)

Postby chad » Wed May 28, 2014 2:00 pm

It didnt recongnise the country identifiers as texts for some reason, I changed them to numbers (instead of "country1", just "1"; instead of "country2", just "2" etc) and it worked. As I say, I am a very new user of eviews and I want to make sure I am selecting the correct options when doing LSDVM. I did the following in my workfile building process and equation building process. Could you pls confirm it is correct?

New Workfile: Structure type "balanced panel" selected; # of cross sections: 4

Then: Proc/Import/Import file and selected the excel file; defined names cross section series and date series. Basic structure selected: "Dated Panel".

In Equation setting: Method selected "LS - Least Squares (LS and AR); Panel Options: Cross-section "fixed", Period "none", GLS Weights "no weights", Coef covariance method "Ordinary".

my excel and workfile are attached. Can you pls confirm pls?

Thanks
Attachments
panel_test_last.WF1
(13.88 KiB) Downloaded 209 times
test for panel_2.xlsx
(9.94 KiB) Downloaded 251 times

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

Re: Fixed effects panel regression (LSDVM)

Postby startz » Wed May 28, 2014 2:38 pm

It looks correct to me. But unless this is just made up data something is wrong since you are getting a perfect fit.

chad
Posts: 5
Joined: Wed May 28, 2014 11:55 am

Re: Fixed effects panel regression (LSDVM)

Postby chad » Wed May 28, 2014 2:56 pm

yes this is made up data, so no worries about the perfect fit.

I have another question. If I want to make just the contant vary across cross section but other coefficiensts remain the same. What change do I need to make in the code (also maybe in excel file) pls?

I was following from other forum discussion (http://forums.eviews.com/viewtopic.php?f=4&t=1087), in which your colleague Eviews_Gareth suggests using "@expand(@crossid)" command.

However if I keep all the settings same and change my equation from "y c x1 x2 x3" to "y @expand(@crossid) X1 x2 x3" to achieve this, it gives an error message of "near singular matrix".

Can please advice what I need to do here to fix this issue in order to get varying constants but same coefficients across cross section.

Thanks again..

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

Re: Fixed effects panel regression (LSDVM)

Postby startz » Wed May 28, 2014 3:06 pm

If you follow Gareth's suggestion with real data it will work fine.

chad
Posts: 5
Joined: Wed May 28, 2014 11:55 am

Re: Fixed effects panel regression (LSDVM)

Postby chad » Wed May 28, 2014 3:50 pm

Okay i will try that.. What adjustment i need to make in order avoid 'dummy variable trap' in my LSDVM pls? Or Eviews inherentlt takes care of this when i define my data set as in the attached excel above?

Thanks

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

Re: Fixed effects panel regression (LSDVM)

Postby startz » Wed May 28, 2014 3:54 pm

If you use @expand, just leave out the constant "C".

chad
Posts: 5
Joined: Wed May 28, 2014 11:55 am

Re: Fixed effects panel regression (LSDVM)

Postby chad » Wed May 28, 2014 4:13 pm

Sorry i am a little confused. Are you suggesting (assuming i am using real data):

If i use in my equation 'y @expand(@crossid) x1 x2 x3' instead of 'y x1 x2 x3' with the data exactly in same format in excel (ie no new dummy column definitions manually or anything) and same panel options as before, then i will get different constants, but same coefficients across cross sections and at the same time avoid the 'dummy variable trap'' in the model?

Thanks

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

Re: Fixed effects panel regression (LSDVM)

Postby startz » Wed May 28, 2014 4:18 pm

Exactly.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests