[SciPy-user] negative values in diagonal of covariance matrix

josef.pktd@gmai... josef.pktd@gmai...
Thu Dec 11 09:57:37 CST 2008

> Actually you do not have sufficient data points to estimate this model
> because you have four parameters and only five observations resulting in
> no degrees of freedom for the error (if you allow correction for the
> mean). I do not know scipy.optimize but I am very doubtful that the
> model even converges correctly (a solution does not mean convergence).
> If the model has not converged then everything else is usually invalid
> (especially when those parameters depend on the solution).

Since the constant is included as one of the four parameters, I don't
think that any degree of freedom are lost.

But, the negative diagonal elements means that the underlying Hessian
or its approximation is not positive-definite. The inverse of a real
symmetric positive definite matrix should have positive diagonal

So, I'm also pretty sure that the the optimization did not converge to
a minimum, so I would either redefine the optimization problem or
choose a more robust optimization algorithm.


More information about the SciPy-user mailing list