[SciPy-User] [SciPy-user] Covariance matrix

Charles R Harris charlesr.harris@gmail....
Mon Feb 13 10:18:48 CST 2012

On Mon, Feb 13, 2012 at 8:56 AM, <josef.pktd@gmail.com> wrote:

> On Sat, Feb 11, 2012 at 7:39 PM, Kevin Gullikson
> <kevin.gullikson@gmail.com> wrote:
> > Use full_output=True when you call leastq, and you will get a matrix
> (among
> > other things). If you multiply that matrix by the standard deviation of
> the
> > residuals, it will be the covariance matrix.
> As Charles pointed out, multiply by the error variance not the
> standard deviation. Docstring is wrong in this.
Even more precisely, multiply by ||err||^2/(n - dof), since it is possible
that the error has an offset unless the model can perfectly fit a constant.
If this actually makes a difference, the model is inadequate, but the
variance estimate might be useful if you are using something like the
Akaike information criterion to choose the number of parameters.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120213/ab9aa799/attachment-0001.html 

More information about the SciPy-User mailing list