Page 5 of 10
Re: Dummy Variables
Posted: Fri Jan 30, 2015 9:21 am
by Jingga
We'd need to see the workfile.
Alright thanks for the replies. I'll try some other things first (create the dummies in Excel for example), since the workfile is 360mb! I'll come back to you if it still happens.
Re: Dummy Variables
Posted: Tue Feb 03, 2015 5:07 am
by Jingga
Hi Gareth,
Since the computers I work with cannot really handle the amount of data to produce 192 dummies, I was wondering, is there a shortcut to construct these in EViews? Last time I manually used @recode 192 times, a bit time consuming you can imagine...
Thanks
edit: I figured out this could be done with @expand(reporting)/@expand(partner). Much quicker, and no room for errors. But still I have the same problem as before. I can send my workfile via wetransfer.com, is that okay?
Re: Dummy Variables
Posted: Tue Feb 10, 2015 2:38 pm
by EViews Gareth
Received your file.
Looking at the correlation matrix for a bunch of dummy variables isn't particularly interesting. Any dummy variable that has the same number of "1"s as another dummy will have the same correlation values.
I'm maintaining my gut feeling that you're simply in the dummy variable trap.
Re: Dummy Variables
Posted: Wed Feb 11, 2015 3:46 am
by Jingga
alright, I checked the 'g1' and 'g2' groups containing all the countries as a dummy. I removed USA from both and updated the group, to avoid the dummy trap. I then tried to estimate my default equation, but with 'g1' and 'g2';
logtrade c bothin onein gsp logdist logprodgdp logprodgdppc fta comcur comlang_ethno contig landl logprodarea comcol curcol colony g1 g2
Still get the error... (landlockedness is no country specific variable, since it is defined as the number of landlocked countries within an observation, so 0/1/2. Most other variables are country-pair specific). Or is there an aspect of the dummy trap I don't get?
Re: Dummy Variables
Posted: Thu Feb 12, 2015 9:48 am
by newtoeviews
Hi all,
As your directed, I have ran a command for filting year from 2006 to 2009 (for sure it is 4 years only) with smpl @first 2006 @last 2009. It turns out the result that
Sample (adjusted): 2000 2006 2010 2013
Periods included: 7
I am not quite sure about it. Could you explain me why it shows that periods included 7 here. I am rather certain about the command since I ran it with years 2000-2005, it gives me the correct periods.
Thanks, HM
Re: Dummy Variables
Posted: Thu Feb 12, 2015 9:58 am
by startz
Hi all,
As your directed, I have ran a command for filting year from 2006 to 2009 (for sure it is 4 years only) with smpl @first 2006 @last 2009. It turns out the result that
Sample (adjusted): 2000 2006 2010 2013
Periods included: 7
I am not quite sure about it. Could you explain me why it shows that periods included 7 here. I am rather certain about the command since I ran it with years 2000-2005, it gives me the correct periods.
Thanks, HM
If you want 2006 through 2009 the right smpl command is
Re: Dummy Variables
Posted: Wed Feb 25, 2015 4:57 am
by Jingga
alright, I checked the 'g1' and 'g2' groups containing all the countries as a dummy. I removed USA from both and updated the group, to avoid the dummy trap. I then tried to estimate my default equation, but with 'g1' and 'g2';
logtrade c bothin onein gsp logdist logprodgdp logprodgdppc fta comcur comlang_ethno contig landl logprodarea comcol curcol colony g1 g2
Still get the error... (landlockedness is no country specific variable, since it is defined as the number of landlocked countries within an observation, so 0/1/2. Most other variables are country-pair specific). Or is there an aspect of the dummy trap I don't get?
Can you help me out Gareth?
Re: Dummy Variables
Posted: Wed Feb 25, 2015 10:01 am
by EViews Gareth
I'm not sure what help I can be. You have a singular matrix.
Re: Dummy Variables
Posted: Thu Feb 26, 2015 3:18 am
by Jingga
But how? You've seen my workfile, I did everything to my knowledge to avoid the dummy trap. Does it just happen sometimes?
Re: Dummy Variables
Posted: Thu Feb 26, 2015 6:01 am
by EViews Gareth
Variables can be colinear for any number of reasons
Re: Dummy Variables
Posted: Thu Feb 26, 2015 7:23 am
by startz
But how? You've seen my workfile, I did everything to my knowledge to avoid the dummy trap. Does it just happen sometimes?
Take the RHS variables that are perfectly collinear and regress one on all the rest. If you get a perfect fit, the coefficients may give you a clue as to what's going on. If you don't get a perfect fit, switch a different variable onto the left of this test regression.
With luck, this will eventually tell you which set of variables is causing the perfect multicollinearity.
Re: Dummy Variables
Posted: Wed Mar 25, 2015 11:06 am
by joshchipunza
Hi Gareth
I am running a model like this:
〖LIQ〗_(i,t) = α+D_1 〖List〗_(i,t)+〖β_1 Disclosure〗_t+β_2 〖Size〗_(i,t)+ 〖B_3 Leverage〗_(i,t)+ ε_(i,t)
where D_1 〖List〗is a dummy variable that take the value of 1 when a firm is cross listed and zero when it is cross traded.
The question is that when i run the regression in Eviews it give a feedback that its a Near Singular Matrix. I understand that it could be an issue of correlation in the variables but i just do not know how to go about it since this is how the model should be like. Your assistance will be greatly appreciated
Re: Dummy Variables
Posted: Wed Mar 25, 2015 11:37 am
by startz
You might want to post your EViews workfile, including the equation you wish to estimate.
Re: Dummy Variables
Posted: Sat Jun 13, 2015 8:06 am
by amal
Hi,
I have a problem with corss-sectional fixed effect estimation for panel data. My database consists in datas from 357 companies from 7 different countries, over 4 years. I am trying to do a fixed effect estimation including dummy variables for the country. So I have for the companies from a certain country the value 1, and 0 for the rest. While trying to estimate this model it gives me the "Near singular matrix" error. How can I correct this error?
Also, i have the same problem by using a variable that has another values that describes each country, not necessarily a dummy variable.
Can you please help me to figure out how to correct this error?
Thank you!
Re: Dummy Variables
Posted: Sun Jun 14, 2015 4:47 am
by EViews Gareth
You've probably fallen into the dummy variable trap, and the only way to fix it is to remove variables.