"Near Singular Matrix Error"

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

AHM1990
Posts: 5
Joined: Sun Oct 04, 2015 12:02 am

"Near Singular Matrix Error"

Postby AHM1990 » Sun Oct 04, 2015 12:18 am

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:)
Attachments
regres.wf1
(99.86 KiB) Downloaded 624 times

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

Re: "Near Singular Matrix Error"

Postby startz » Sun Oct 04, 2015 7:40 am

Probably the dummy variable trap. You can't have a constant and a complete set of dummies. Nor two complete sets of dummies.

AHM1990
Posts: 5
Joined: Sun Oct 04, 2015 12:02 am

Re: "Near Singular Matrix Error"

Postby AHM1990 » Sun Oct 04, 2015 1:58 pm

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

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

Re: "Near Singular Matrix Error"

Postby startz » Sun Oct 04, 2015 2:13 pm

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.

AHM1990
Posts: 5
Joined: Sun Oct 04, 2015 12:02 am

Re: "Near Singular Matrix Error"

Postby AHM1990 » Sun Oct 04, 2015 2:22 pm

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?

AHM1990
Posts: 5
Joined: Sun Oct 04, 2015 12:02 am

Re: "Near Singular Matrix Error"

Postby AHM1990 » Sun Oct 04, 2015 2:38 pm

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.
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"

Postby startz » Sun Oct 04, 2015 2:42 pm

Looks like you answered your own question in your second post. :!:

AHM1990
Posts: 5
Joined: Sun Oct 04, 2015 12:02 am

Re: "Near Singular Matrix Error"

Postby AHM1990 » Sun Oct 04, 2015 2:51 pm

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."

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

Re: "Near Singular Matrix Error"

Postby startz » Sun Oct 04, 2015 3:44 pm


joshua.crsb
Posts: 5
Joined: Wed Oct 21, 2015 9:46 am

Re: "Near Singular Matrix Error"

Postby joshua.crsb » Wed Dec 09, 2015 8:01 am

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


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests