Statsmodels version 0.6.1 does not include tsa?
Asked Answered
L

1

16

I'm trying to get the HP-filter working using statsmodels (sm).

The documentation here implies that the module sm.tsa already exists for 0.6.1, but I get the following error:

>>> import statsmodels as sm
>>> sm.__version__
'0.6.1'
>>> sm.tsa.filters.hp_filter.hpfilter()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'tsa'
>>> sm.tsa
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'tsa'

Here's my pip output:

nat-oitwireless-inside-vapornet100-a-14423:prog2 foobar$ pip show statsmodels
---
Name: statsmodels
Version: 0.6.1
Location: /usr/local/lib/python2.7/site-packages/statsmodels-0.6.1-py2.7-macosx-10.9-x86_64.egg
Requires: 
Lockout answered 5/12, 2014 at 22:29 Comment(0)
A
25

You need to import statsmodels.api as sm

Afoul answered 6/12, 2014 at 0:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.