Near Singular Matrix Error
Moderators: EViews Gareth, EViews Moderator
Near Singular Matrix Error
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
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 899 times
Re: Near Singular Matrix Error
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...
Re: Near Singular Matrix Error
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
Thanks again for you quick response and help
Re: Near Singular Matrix Error
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.

 Posts: 5
 Joined: Mon May 18, 2015 3:51 am
Re: Near Singular Matrix Error
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
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 396 times

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11926
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Near Singular Matrix Error
What is the equation specification you're trying to estimate?
Follow us on Twitter @IHSEViews

 Posts: 5
 Joined: Mon May 18, 2015 3:51 am
Re: Near Singular Matrix Error
Dear Gareth,
I found the problem. My variable OPRISK takes the same value for any company year observation in the sample, 20082012. 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
I found the problem. My variable OPRISK takes the same value for any company year observation in the sample, 20082012. 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

 Posts: 1
 Joined: Wed Apr 04, 2018 6:06 am
Re: Near Singular Matrix Error
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.
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 132 times

 Nonnormality and collinearity are NOT problems!
 Posts: 3406
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix Error
You're probably going to have to show the equation you are estimating and explain it to get much useful advice.
Re: Near Singular Matrix Error
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!

 Nonnormality and collinearity are NOT problems!
 Posts: 3406
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix Error
You'll probably have to give more details of exactly what you did. And possibly post your data.
Re: Near Singular Matrix Error
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 78 times

 Capture2.JPG (81.66 KiB) Viewed 5101 times

 Capture1.JPG (85.46 KiB) Viewed 5101 times

 Nonnormality and collinearity are NOT problems!
 Posts: 3406
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Near Singular Matrix Error
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.
By the way, the White test is a large sample test and using it 20 observations probably isn't valid.
Re: Near Singular Matrix Error
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?
Re: Near Singular Matrix Error
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.
Who is online
Users browsing this forum: No registered users and 10 guests