Error message: system is computationally singular

Hello,

during my 2SLS-Regression I have a problem with an error popping up that says:

Error in solve.default(vcov.hyp) :
system is computationally singular: reciprocal condition number = 2.85793e-17

It appears, when I call the summary. The regression itself works actually and the results are saved in the environment. Any ideas, what is the problem?

What does the error message mean actually? I found that the error it has to do with singular matrices and that it might appear, or if there are too many variables. Is that correct? In fact I have 8 exogenous variables and 13 instruments and I don't get the error in a standard linear regression. But anyways I have a very similar analysis with 8 variables and 35 instruments that works fine. As a solution I found that I might change the tolerance in the "solve" function, but not sure how to do that in the summary function. So help or a bit of explanation is highly appreciated. Thanks in advance.

Best regards

1 Like

Hi mihefra,

I'm running into the exact same problem and none of the solutions posted for resolving this in other contexts than 2SLS seem to work.
If you find a solution, please be so kind to post it here.

Best

Alright, will do. By the way, the error also occurs using stargazer() instead of summary().

Anyone here knows, what "solve.default(vcov.hyp)" is? Looks like something about covariance. Maybe it is possible to isolate the fault and find a solution.

I can't be certain without seeing your data, the code that you ran and the model output, however, this sounds like a situation where two or more of the independent variables in your regression are highly correlated or perhaps even linearly dependent. This means that there isn't a unique solution for the parameters of your regression or that whatever solution you're getting has huge standard errors.

Since I couldn't fix the error I have other questions.

  1. What alternatives are there to the summary() function? I need the p-values of the t-test and adjusted the R-squared
  2. I would like to change the tolerance in solve(), but summary() uses solve.default(). Is there an option to change it inside summary()?
    I can post my code, if that helps. Thank you in advance, I appreciate it a lot.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.