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.We'd need to see the workfile.
Dummy Variables
Moderators: EViews Gareth, EViews Moderator
Re: Dummy Variables
Re: Dummy Variables
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?
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?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
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.
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
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?
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?
Last edited by Jingga on Tue Feb 17, 2015 4:53 am, edited 1 time in total.
-
newtoeviews
- Posts: 7
- Joined: Fri Jan 23, 2015 8:51 am
Re: Dummy Variables
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
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
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Dummy Variables
If you want 2006 through 2009 the right smpl command isHi 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
Code: Select all
smpl 2006 2009
Re: Dummy Variables
Can you help me out Gareth?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?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
I'm not sure what help I can be. You have a singular matrix.
Re: Dummy Variables
But how? You've seen my workfile, I did everything to my knowledge to avoid the dummy trap. Does it just happen sometimes?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
Variables can be colinear for any number of reasons
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Dummy Variables
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.But how? You've seen my workfile, I did everything to my knowledge to avoid the dummy trap. Does it just happen sometimes?
With luck, this will eventually tell you which set of variables is causing the perfect multicollinearity.
-
joshchipunza
- Posts: 10
- Joined: Wed Mar 04, 2015 2:21 pm
Re: Dummy Variables
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
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
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Dummy Variables
You might want to post your EViews workfile, including the equation you wish to estimate.
Re: Dummy Variables
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!
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!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dummy Variables
You've probably fallen into the dummy variable trap, and the only way to fix it is to remove variables.
Who is online
Users browsing this forum: No registered users and 2 guests
