Hi,
I have searched the web, including this forum, but with no success, so I was hoping someone could help me with my problem.
I get the following error when trying to run my model:
"Near Singular Matrix Error - Regressors may be perfectly collinear."
The command im running is:
ls roa_did c pe log_size log_age roa_pre em_pre industry1 industry2 industry3 industry4 industry5 industry6 industry7 industry8 industry9 year1 year2 year3 year4 year5 year6 year7 year8 year9
The problem is in the Industry and Year series. They are both dummy variables. I can add up to 8 industry or year variables, but when I add the last one, I get the perfectly collinear error message.
The two variables are dummies, where 1 or 0 will be present in all, so there will always be a 1 in every year / industry. But I cant see how that can make it collinear in any way.
Using version: Eviews 8, 64 bit Oct 8 2013 Build.
So, in short, when I add the ninth and last dummy variable in either Year or Industry, I get the error. I can run the model with 8 years and 8 industries.
I hope I made sense. I am new to Econometrics, Eviews and this forum.
Thanks in advance:)
"Near Singular Matrix Error"
Moderators: EViews Gareth, EViews Moderator
"Near Singular Matrix Error"
- Attachments
-
- regres.wf1
- (99.86 KiB) Downloaded 626 times
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: "Near Singular Matrix Error"
Probably the dummy variable trap. You can't have a constant and a complete set of dummies. Nor two complete sets of dummies.
Re: "Near Singular Matrix Error"
Hi Startz,
Thanks alot for the reply.
I think you are right, that I infact have the dummy variably trap.
What do you mean by "complete set of dummies?"
In my 9 year and 9 industry dummies, all my observations, fits into one year and one industry category. Is that what you mean?
I can´t see how i can fix the problem. Removing the constant seems wrong, yes?
And having two full sets of dummies enhances the specification of my econometric model, eventhough most control dummies seem to be very insignificant from the few testruns that I have done.
Kind regards in advance :D
Thanks alot for the reply.
I think you are right, that I infact have the dummy variably trap.
What do you mean by "complete set of dummies?"
In my 9 year and 9 industry dummies, all my observations, fits into one year and one industry category. Is that what you mean?
I can´t see how i can fix the problem. Removing the constant seems wrong, yes?
And having two full sets of dummies enhances the specification of my econometric model, eventhough most control dummies seem to be very insignificant from the few testruns that I have done.
Kind regards in advance :D
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: "Near Singular Matrix Error"
Put the constant in. Then put in all but one dummy for each category. It doesn't matter which one you drop so long as you are careful in interpretation.
Re: "Near Singular Matrix Error"
Thanks again Startz.
I have actually already done what you said.
Essentially I dont understand why my x-variables should be exposed to perfect multicollinarity, as I think I havent included any redundant variables.
But I can run the model, including the constant with if I, ex. add the following:
year1
...
Year8,
LEAVE out year 9
Industry 1
...
industry8
LEAVE out industry9.
So that is nice, but it seems alittle pseudo-approch-ish?:)
But i mean, from a scientifically point of view, it seems quite odd to randomly leave 1 dummy variable out.
I wouldnt know how to elaborate on that, when documenting it in my thesis
I think most textbooks do actually propose what you suggested, 1) leave out the constant, 2) run with k-1 dummy variables.
Thoughts?
I have actually already done what you said.
Essentially I dont understand why my x-variables should be exposed to perfect multicollinarity, as I think I havent included any redundant variables.
But I can run the model, including the constant with if I, ex. add the following:
year1
...
Year8,
LEAVE out year 9
Industry 1
...
industry8
LEAVE out industry9.
So that is nice, but it seems alittle pseudo-approch-ish?:)
But i mean, from a scientifically point of view, it seems quite odd to randomly leave 1 dummy variable out.
I wouldnt know how to elaborate on that, when documenting it in my thesis
I think most textbooks do actually propose what you suggested, 1) leave out the constant, 2) run with k-1 dummy variables.
Thoughts?
Re: "Near Singular Matrix Error"
in "A guide to Modern Econometrics" third edition, by Marno Veerbeek, he states on page 80: (working on a wage-example)
"Note that with five educational levels, in the inclusion of four dummies is sufficient to capture all effects. By including five dummies, we would fall into the so-called Dummy-Variable-Trap, and exact multicollinearity would arise. Which of the five dummy variables is excluded is immaterial; it only mattters for the economic interpretation of the other dummies coefficients. The ommited category acts as a reference group, and all effects are relative to this group.
"Note that with five educational levels, in the inclusion of four dummies is sufficient to capture all effects. By including five dummies, we would fall into the so-called Dummy-Variable-Trap, and exact multicollinearity would arise. Which of the five dummy variables is excluded is immaterial; it only mattters for the economic interpretation of the other dummies coefficients. The ommited category acts as a reference group, and all effects are relative to this group.
Last edited by AHM1990 on Sun Oct 04, 2015 2:49 pm, edited 1 time in total.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: "Near Singular Matrix Error"
Looks like you answered your own question in your second post. 
Re: "Near Singular Matrix Error"
True, I think I will have to go with simply leaving a dummy variable out, eventhough Im note convinced.
Do you understand this, and how this should interpreted?
"The ommited category acts as a reference group, and all effects are relative to this group."
Do you understand this, and how this should interpreted?
"The ommited category acts as a reference group, and all effects are relative to this group."
-
joshua.crsb
- Posts: 5
- Joined: Wed Oct 21, 2015 9:46 am
Re: "Near Singular Matrix Error"
I am having a similar issue - the equation I am using to forecast sales in months 10, 11, 12 is "sales/(cpi/100) c ar(1) ma(1) @seas(1) @seas(2) @seas(3) @seas(4) @seas(4) @seas(5) @seas(6) @seas(7) @seas(8) @seas(9) @seas(10) @seas(11) @seas(12)" I haven't decided on whether to use linear or quadratric trends yet, but when I put either in the formula I still get a "Near Singular Matrix Error" I have never seen this before - and am doing reading as to how to fix it...but I thought I would ask for help as well. As per my assignment I have to use the ARMAX methodology so I don't have much free play in the equation or approach.
Many thanks,
JC
:D
Many thanks,
JC
:D
Who is online
Users browsing this forum: No registered users and 2 guests
