I have seen other topics on this, but I couldn't get their solutions working for me. Perhaps someone else will know why. namely:
statsmodels: error in kde on a list of repeated values
However, my issue is as follows. I also have a 3 x 3 dataset that I am using for a MixedLM. Below is the columns for the dependent and independent variables respectively:
During that process, it produces the hessian matrix and fails with the following error:
To recreate this, we can see that the hessian matrix has values:
tmp_hess = [[-9.74829199, -39.68893414,0.],
[-9.68893414, -190.50276655, -0.],
[-0.,- 0., 0.]]
so if you then run the same process:
np.linalg.inv(tmp_hess)
or
np.linalg.inv(-tmp_hess)
However, it's not clear to me why this would fail. According the Numpy api, it should only fail if the matrix isn't square (This one is, so all good), or if the inversion fails. However, it's not clear to me why the inversion would fail on this matrix.
Has anyone seen this before or able to help?
Thank you!