I'm trying to perform a linear regression on a set of two-dimensional points using scipy. As stated by the documentation here, the appropriate call is
regression_results = scipy.stats.linregress(x_values, y_values)
The documentation states that the regression_results object contains the following values: slope, intercept, rvalue, pvalue, stderr, intercept_stderr. All of these are present except the last.
These values are all present in the dict, but intercept_stderr is simply not. I cannot for the life of me fathom why. Here is the simple code I attempted to run:
from scipy import stats
# given two lists nmeq_x and nmeq_y...
result = stats.linregress(nmeq_x, nmeq_y)
print(result.intercept, result.intercept_stderr)
I get the error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-18-7df9d260a3bb> in <module>
1 result = stats.linregress(nmeq_x, nmeq_y)
----> 2 print(result.intercept, result.intercept_stderr)
AttributeError: 'LinregressResult' object has no attribute 'intercept_stderr'