[SciPy-user] linear regression

ms devicerandom at gmail.com
Wed May 27 11:54:47 EDT 2009


josef.pktd at gmail.com ha scritto:
> On Wed, May 27, 2009 at 10:05 AM, ms <devicerandom at gmail.com> wrote:
>> jason-sage at creativetrax.com ha scritto:
>>> Is there a recommended way now of calculating the slope of a linear
>>> regression?  Using the scipy.stats.linregress function gives a
>>> deprecation warning, apparently because that function uses the
>>> scipy.mean function:
>> I think you can use polyfit for doing linear regression, isn't it?
> 
> but you don't get the slope coefficient and the standard errors, if
> you want more than just prediction. 

You mean the correlation coefficient? This is numpy.corrcoef() or
something like that.

But for the std errors, you are right -I get them from odr usually for
non linear fits, but maybe it's overkill for linear fit.

m.



More information about the SciPy-User mailing list