Discussion:
[pystatsmodels] statsmodels.tsa.stattools.adfuller Regression Results
Keith Jacobs
2016-02-21 15:46:37 UTC
Permalink
I'm using the Augmented Dickey-Fuller function (statsmodels.tsa.stattools.adfuller).
I'm trying to get it to return the Regression results.

The arguments passed into the function are: adf = ts.adfuller(x,
autolag='AIC', regression='c', store=True, regresults=True).

Instead of getting the results returned, I get <statsmodels.tsa.stattools.ResultsStore
object at 0x7ff6fab1b350>. When I try to parse this using str(), I get this
error AttributeError: 'ResultsStore' object has no attribute '_str'.

How do I access the Regression results?
j***@gmail.com
2016-02-21 21:57:55 UTC
Permalink
Post by Keith Jacobs
I'm using the Augmented Dickey-Fuller function (statsmodels.tsa.stattools.adfuller).
I'm trying to get it to return the Regression results.
The arguments passed into the function are: adf = ts.adfuller(x,
autolag='AIC', regression='c', store=True, regresults=True).
Instead of getting the results returned, I get <statsmodels.tsa.stattools.ResultsStore
object at 0x7ff6fab1b350>. When I try to parse this using str(), I get this
error AttributeError: 'ResultsStore' object has no attribute '_str'.
How do I access the Regression results?
The results store instance has the results as attributes, e.g.

results.adfstat
results.usedlag
results.critvalues

dir(results) to see what attributes are available

results.resols is the auxiliary regression that has been used to calculate
the adf statistic.

In the source, I see that the pvalue is not attached. That's a bug, and was
most likely forgotten to add in a refactor or enhancement..

Josef
Keith Jacobs
2016-02-22 18:59:12 UTC
Permalink
Thanks for the response.

I'm new to Python. Do you have any example code that shows how to access
the ResultsStore instance?
Post by j***@gmail.com
Post by Keith Jacobs
I'm using the Augmented Dickey-Fuller function (statsmodels.tsa.stattools.adfuller).
I'm trying to get it to return the Regression results.
The arguments passed into the function are: adf = ts.adfuller(x,
autolag='AIC', regression='c', store=True, regresults=True).
Instead of getting the results returned, I get <statsmodels.tsa.stattools.ResultsStore
object at 0x7ff6fab1b350>. When I try to parse this using str(), I get this
error AttributeError: 'ResultsStore' object has no attribute '_str'.
How do I access the Regression results?
The results store instance has the results as attributes, e.g.
results.adfstat
results.usedlag
results.critvalues
dir(results) to see what attributes are available
results.resols is the auxiliary regression that has been used to calculate
the adf statistic.
In the source, I see that the pvalue is not attached. That's a bug, and
was most likely forgotten to add in a refactor or enhancement..
Josef
Loading...