How to fix the error "Diagonal of the variance_matrix_ has negative values or NaNs while using Gompertz function?
While running the example of Gompertz function using the waltons dataset, I encountered this error:
`.local/lib/python3.6/site-packages/lifelines/fitters/init.py:994: StatisticalWarning:
The diagonal of the variance_matrix_ has negative values or NaNs. This could be a problem with GompertzFitter's fit to the data.
It's advisable to not trust the variances reported, and to be suspicious of the fitted parameters too. Perform plots of the cumulative hazard to help understand the latter's bias.
To fix this, try specifying an initial_point kwarg in fit.`
Any idea how to fix it? Is it only me or someone else facing the same issue?
Any help on this? Thanks
I faced with the same problem. In my case, normalization of durations T = T/T.max() led to a convergence of the solution.