panel - Least square dummy variable

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

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

panel - Least square dummy variable

Postby baqlava » Tue Jul 07, 2009 4:31 am

Hi
When I make the Least square dummy variable in eviews I get this error message: Near singular matrix
Im writing the equation as below and im choosing cross-section:Fxied effect from Panel options :

dr c growth size risk profitability tangibility d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 d42 d43 d44 d45 d46 d47 d48 d49 d50 d51 d52 d53 d54 d55


My dependent variable is dr and indepedent variables are growth, size, risk, profitability, and tangibility. Since I have 55 firm, I have included only 54 dummy variable to avoid falling into dummy variable trap.
d2 = 1 for the second firm, 0 otherwise
d3=1 for the third firm, 0 otherwise
d4 d5 etc.
Is there something wrong with this model? or am I doing something worng?How do I fix it?
My excel and eviews files are attached.
Attachments
debt.wf1
(160.32 KiB) Downloaded 721 times
dummy.xlsx
(78.28 KiB) Downloaded 892 times

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Tue Jul 07, 2009 8:04 am

It appears as though you're trying to use fixed effects, and use dummies for each cross-section. This won't work (since they're the same thing). Choose one or the other.

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Thu Jul 09, 2009 10:26 am

Thanks for the help. It worked well now. I have another question. If I want to assume that all the coefficients (intercept and slopes) vary across individuals (cross sections), how do I do this? shall I add new columns in my excel sheet and add them in the eviews? if yes, how will I write the equation in the Eviews?

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Thu Jul 09, 2009 10:35 am

EViews doesn't have an inbuilt routine for cross-section specific coefficients on independent variables in panel workfiles.

You have two choices: you can either switch to a Pool specficication (pools do allow cross-section specific coefficients), or you can do it manually in the panel with dummy variables. If you choose the manual method, you can do something like:

Code: Select all

ls y c @expand(@crossid)*x1 @expand(@crossid)*x2
to generate the dummies automatically.

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Thu Jul 09, 2009 2:22 pm

Sorry but I didn't get the first choice. Do you mean that I have to choose from the option (fixed) (cross section)? and my formula will be like the OLS?
dr c size growth risk profitability tangibility <--- equation like this in OLS??

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Thu Jul 09, 2009 2:33 pm

I don't understand your question.


Assuming you have your data in a panel workfile, and you wish to have cross-section specific coefficients for RISK, then you could specify your equation as:

Code: Select all

dr c size growth @expand(@crossid)*risk profitability tangibility

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Thu Jul 09, 2009 2:50 pm

Thank you for response. My question is that if I want to make [fixed effect all the coefficients vary across cross sections/individuals/companies], I have to include dummy variables a in the LSDV mode (differential intercept dummies) to account for the difference in the intercept and also (differential slope dummies) to account for the difference in slope coefficients.
I did the LSDV as in my first post and it worked well. I did the equation as follows:

dr c growth size risk profitability tangibility d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 d42 d43 d44 d45 d46 d47 d48 d49 d50 d51 d52 d53 d54 d55


Now I want to do the other fixed effect which is [fixed effect all the coefficients vary across cross sections/individuals/companies] how do I do it in eviews? I did not understand the choices you provided to me because I am new user with eviews

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Thu Jul 09, 2009 3:15 pm

Instead of specifying your equation as:

Code: Select all

dr c growth size risk profitability tangibility d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 d32 d33 d34 d35 d36 d37 d38 d39 d40 d41 d42 d43 d44 d45 d46 d47 d48 d49 d50 d51 d52 d53 d54 d55
Specify it as:

Code: Select all

dr @expand(@crossid) @expand(@crossid)*size @expand(@crossid)*risk @expand(@crossid)*profitability tangibility

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Thu Jul 09, 2009 3:28 pm

Thanks for your quick response. My last two questions
1- Is this for least square dummy variables (i.e. different intercept but constant slopes) or for all coefficients vary across individuals (i.e. intercept and slopes vary)?

2- you wrote:
dr @expand(@crossid) @expand(@crossid)*size @expand(@crossid)*risk @expand(@crossid)*profitability tangibility

It seems that the intercept is not mentioned in this equation and also tangibility you didnt include: @expand(@crossid)*tangibility nor @expand(@crossid)*growth

so do I have to include the intercept c and @expand(@crossid)*tangibility and @expand(@crossid)*growth ?

Thanks again and sorry for my questions.

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Thu Jul 09, 2009 4:32 pm

Just use @expand(@crossid) multiplied by any variable you wish to have individual effects for. If you want individual effects for the intercept, then multiply it by 1 (or just leave it as is)

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Thu Jul 09, 2009 9:49 pm

Many thanks.Bbut regarding my first question in the last post, is this method for fixed within group? i.e. different intercept and different slopes?

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

Re: panel - Least square dummy variable

Postby EViews Gareth » Thu Jul 09, 2009 10:15 pm

As I said, it is for whatever you want it to be.

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

Re: panel - Least square dummy variable

Postby startz » Thu Jul 09, 2009 10:34 pm

Many thanks.Bbut regarding my first question in the last post, is this method for fixed within group? i.e. different intercept and different slopes?
Try a small example. When you look at the output it will help clear up what's going on.

baqlava
Posts: 7
Joined: Tue Jul 07, 2009 3:14 am

Re: panel - Least square dummy variable

Postby baqlava » Fri Jul 10, 2009 12:38 am

thanks a lot

ANURADHA AGARWAL
Posts: 7
Joined: Wed Aug 05, 2015 11:15 pm

Re: panel - Least square dummy variable

Postby ANURADHA AGARWAL » Wed Nov 18, 2015 3:41 am

Hello sir,
I am working on to examine the impact of liberalization an CAB (1 dependent and 2 independent variables)by using quarterly data over a period of 15 years for 5 countries.
can i apply LSDV model with none effect specification(none cross section and period) by using following equation:
cab fo to @expand(@crossid)

because when i apply this equation with fixed effect specification. it shows near singular matrix.
please tell me how can i apply it.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests