x <- matrix(rnorm(80, mean = 0, sd = 0.1), 8, 8)
c <- cov(x)
solve(c)
I get the error message:
Error in solve.default(c) : system is computationally singular:
reciprocal condition number = 6.57889e-18
I have been trying to figure out what is the reason behind the problem, and other threads at Stack Overflow have suggested the issue might be due to singular matrices, highly correlated variables, linear combination etc. However, I assumed that rnorm
would avoid the mentioned problems.
For another matrix that I am working with det() gives 8.313969e-95
, but it is still invertible with solve()
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…