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

corbinm
Posts: 2
Joined: Wed Feb 05, 2014 4:02 am

Near Singular Matrix Error

Postby corbinm » Wed Feb 05, 2014 4:11 am

Hi,

I am having an issue using e views 8 student version. I am getting the typical near singular matrix error and so far I have been un able to find a solution. The regression I am attempting to run is

excess1 c shortint instiown monthd quarterd yeard shortint*monthd shortint*quarterd shortint*yeard excess0 excess0*monthd excess0*quarterd excess0*yeard excess0*shortint excess0*monthd*shortint excess0*quarterd*shortint excess0*yeard*shortint

This is one of three equations which all include similar variables and has been successfully run on several other country data sets I am testing. However for some reason I run into this problem only on my Indonesia data set and one other data set our of over 60. I've tried removing the constant variable and that has done nothing. I need to include all other variables and so I can't afford to start deleting variables here and there.

Just for reference the dummy variables are monthd quarterd and yeard which indicate different period ends,i.e a month end quarter end or year end date. and there is no over lap, so the last date in jan and feb will have a 1 for month end while the end of march with have a 1 for quarter end but a zero for month end and so on

Any help would be great, Ive attached the .txt file below which im using as my data in e views
Attachments
Indo Data - Low Vol.txt
(540.13 KiB) Downloaded 861 times

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Near Singular Matrix Error

Postby trubador » Wed Feb 05, 2014 5:33 am

As far as the machine is concerned, you have a perfect (negative) correlation between "excess0*yeard*shortint" and "yeard*shortint" variables. You'll have to drop one of them...

corbinm
Posts: 2
Joined: Wed Feb 05, 2014 4:02 am

Re: Near Singular Matrix Error

Postby corbinm » Wed Feb 05, 2014 7:01 am

I see, thank you for your help with that. I am still relatively new to e views and very rusty on my econmetrics. Could you explain the commands for determining this issue as I have a couple other equations which are presenting a similar issue? Further more does this suggest an issue with my data or is it a matter of chance probability that this occurred for the variables in this data set while numerous other identical ones (for other countries) did not run in to this problem?

Thanks again for you quick response and help

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Near Singular Matrix Error

Postby trubador » Wed Feb 05, 2014 7:52 am

This seems to be a problem with your data. You have generated variables that are nearly identical. You should check your data prior to analysis. For this instance, you can group your variables and look at the correlation matrix.

Marcel Visser
Posts: 5
Joined: Mon May 18, 2015 3:51 am

Re: Near Singular Matrix Error

Postby Marcel Visser » Mon May 18, 2015 3:59 am

Dear all,

I am receiving the same error code. I attached my original correlation matrix. Even when I do not include the variables for Financial Development and Profitability in the regression I still get the error code.
Does anyone know what I am doing wrong and how i will be able to fix this?

Thanks in advance.

Marcel Visser
Attachments
tableeviews.csv
correlation matrix
(592 Bytes) Downloaded 374 times

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

Re: Near Singular Matrix Error

Postby EViews Gareth » Mon May 18, 2015 7:56 am

What is the equation specification you're trying to estimate?
Follow us on Twitter @IHSEViews

Marcel Visser
Posts: 5
Joined: Mon May 18, 2015 3:51 am

Re: Near Singular Matrix Error

Postby Marcel Visser » Mon May 18, 2015 9:01 am

Dear Gareth,

I found the problem. My variable OPRISK takes the same value for any company year observation in the sample, 2008-2012. So the value only varies when companies change, not when years change. I found somewhere else on this forum that this prevents you from running a cross section fixed effects regression. The regression I try to run is Leverage ratio= c (Financial development) (Inflation) (Marginal tax rate) (OPRISK) (log sales) (profitability) (tangibility). Can I just remove the variable OPRISK and run the regression. Will this accurately remove the year and section effects from the other variables? Because I still need to control for the year and section effects on the other variables. My sample size is very large, 122000 observations per variable. Therefor I cannot upload my file. The thing is i ran a Hausman test which told me to use a fixed effect model. However, the OPRISK variable prevents me from doing this. The book Introductory econometrics for finance also said that you could use a slightly modified version of the Chow test to check if a panel regression was really necessary. It said in some cases you could just pool the data and preform a regular OLS.

If i will not be able to exclude the year and section effects with a fixed effects panel regression, should i then use this approach. And could you please tell me how this is done?

I would like to thank you in advance for your time.

Kind regards,
Marcel Visser

said.abouabdo
Posts: 1
Joined: Wed Apr 04, 2018 6:06 am

Re: Near Singular Matrix Error

Postby said.abouabdo » Wed Apr 04, 2018 6:58 am

Hello,
Im facing the problem of " Near singular matrix error. Regressors may be perfectly collinear".
The thing is most of my data if not all is formed out of ratings transformed into dummy variables. I do not know what to do in order to generate results? Can anyone suggest any way? In order to decrease the number of variables, ive but all the variables in one group but it does not seem like it is going to work.
Attachments
all ratings.wf1
(1.84 MiB) Downloaded 100 times

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

Re: Near Singular Matrix Error

Postby startz » Wed Apr 04, 2018 8:57 am

You're probably going to have to show the equation you are estimating and explain it to get much useful advice.

Alina03
Posts: 16
Joined: Sat Jul 14, 2018 12:49 am

Re: Near Singular Matrix Error

Postby Alina03 » Sat Jul 14, 2018 5:59 am

Hi, I want to perform White heteroskedasticity test, using a VAR model, but when I click on that test, it appears ”near singular matrix” error. I have 6 variables, annual data from 1995 to 2017. How could I manage this problem? Thank you!

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

Re: Near Singular Matrix Error

Postby startz » Sat Jul 14, 2018 6:50 am

You'll probably have to give more details of exactly what you did. And possibly post your data.

Alina03
Posts: 16
Joined: Sat Jul 14, 2018 12:49 am

Re: Near Singular Matrix Error

Postby Alina03 » Sat Jul 14, 2018 6:59 am

My variables are dgdp, dge, dgv, dpd, dpr, dh (these variable are already stationary at first or second difference). When I open them as VAR and I want to perform white heteroskedasticity test, it appears the error near singular matrix. But when I exclude one variable, as in capture 1, I can perform that test. Could you help me please. I am so disperate because I have to finish my project.
Attachments
Eviews - VAR model.wf1
(20.29 KiB) Downloaded 51 times
Capture2.JPG
Capture2.JPG (81.66 KiB) Viewed 3160 times
Capture1.JPG
Capture1.JPG (85.46 KiB) Viewed 3160 times

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

Re: Near Singular Matrix Error

Postby startz » Sat Jul 14, 2018 7:15 am

I believe the White test has more right hand side variables than you have observations, in which case the test can't be done. It's not a very informative error message.

By the way, the White test is a large sample test and using it 20 observations probably isn't valid.

Alina03
Posts: 16
Joined: Sat Jul 14, 2018 12:49 am

Re: Near Singular Matrix Error

Postby Alina03 » Sat Jul 14, 2018 7:22 am

I don t know if you saw, but I attached the model to take a look at it. What should I do in this case? Is it better to exclude a variable?

Alina03
Posts: 16
Joined: Sat Jul 14, 2018 12:49 am

Re: Near Singular Matrix Error

Postby Alina03 » Sat Jul 14, 2018 7:26 am

How can I perform a correct VAR model, if I don t test the heteroskedasticity? Finally, I want to present the impulse response functions in my project and I want to assure that the VAR model is correct.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 15 guests