[SciPy-User] StdErr Problem with Gary Strangman's linregress function

totalbull@ma... totalbull@ma...
Sun Jan 10 15:35:35 CST 2010

Hello, Excel and scipy.stats.linregress are disagreeing on the standard error of a regression. 

I need to find the standard errors of a bunch of regressions, and prefer to use pure Python than RPy. So I am going to scipy.stats.linregress, as advised at:

>>> from scipy import stats
>>> x = [5.05, 6.75, 3.21, 2.66]
>>> y = [1.65, 26.5, -5.93, 7.96]
>>> gradient, intercept, r_value, p_value, std_err = stats.linregress(x,y)
>>> gradient
>>> intercept
>>> r_value
>>> r_value**2
>>> std_err

The problem is that the std error calculation does not agree with what is returned in Microsoft Excel's STEYX function (whereas all the other output does). From Excel:

Anybody knows what's going on? Any alternative way of getting the standard error without going to R?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100110/6f4212a0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.tiff
Type: image/tiff
Size: 33948 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20100110/6f4212a0/attachment-0001.tiff 

More information about the SciPy-User mailing list