1

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:

enter image description here

During that process, it produces the hessian matrix and fails with the following error:

enter image description here

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!

Didier
  • 111
  • 1
  • Please provide further details about your study, the model, and the data iteslf. This may be a programming issue in which case it will be off topic here, but if it is a statistical issue, and you can provide a reproducible example, we should be able to help. – Robert Long Mar 04 '21 at 14:23

0 Answers0