The Error:
LinAlgError: Singular matrix
I am using the function correlate() from python package 'mcerp'. My error comes when trying to input this correlation matrix into the function.
array([[1. , 0. , 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0.3 , 0.5 , 0. , 0.3 ,
0.6 , 0. , 0. , 0. ],
[0. , 1. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[0.1 , 0. , 1. , 0.2 , 0.4 , 0.2 , 0.2 , 0.05, 0.2 , 0. , 0.1 ,
0.1 , 0. , 0. , 0. ],
[0.1 , 0. , 0.2 , 1. , 0.2 , 0.1 , 0.05, 0.1 , 0.3 , 0. , 0.3 ,
0.4 , 0. , 0. , 0. ],
[0.1 , 0. , 0.4 , 0.2 , 1. , 0.1 , 0.1 , 0.1 , 0.1 , 0. , 0.1 ,
0.1 , 0. , 0. , 0. ],
[0.1 , 0. , 0.2 , 0.1 , 0.1 , 1. , 0.1 , 0.1 , 0.1 , 0. , 0.1 ,
0.1 , 0. , 0. , 0. ],
[0.1 , 0. , 0.2 , 0.05, 0.1 , 0.1 , 1. , 0.1 , 0.1 , 0. , 0.1 ,
0.1 , 0. , 0. , 0. ],
[0.3 , 0. , 0.05, 0.1 , 0.1 , 0.1 , 0.1 , 1. , 0.2 , 0. , 0.2 ,
0.2 , 0. , 0. , 0. ],
[0.5 , 0. , 0.2 , 0.3 , 0.1 , 0.1 , 0.1 , 0.2 , 1. , 0. , 0.3 ,
0.4 , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. , 0. ,
0. , 0. , 0. , 0. ],
[0.3 , 0. , 0.1 , 0.3 , 0.1 , 0.1 , 0.1 , 0.2 , 0.3 , 0. , 1. ,
0.5 , 0. , 0. , 0. ],
[0.6 , 0. , 0.1 , 0.4 , 0.1 , 0.1 , 0.1 , 0.2 , 0.4 , 0. , 0.5 ,
1. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 1. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 1. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 1. ]])
I understand from reading online this means the determinant is 0, and collinearity might exist within the matrix. However, this is a correlation matrix.
My determinant is not 0.
np.linalg.det(mtrx)
Out[269]: 0.15753298826875
Can anyone explain why THIS matrix specifically is singular? Or help me resolve this issue?