from statsmodels import tsa as ts
import pandas as pd
import numpy as np
from ggplot import *
# Enable inline plotting
%matplotlib inline
d = np.random.normal(size=300)
#D = ts.filters.bkfilter(d, K=8)
D = ts.ar_model.AR(d)
D.fit()
<statsmodels.tsa.ar_model.ARResultsWrapper at 0x105278450>
qplot(y=d, x=xrange(len(d)))+geom_line()
<ggplot: (281023137)>
qplot(y=D, x=xrange(len(D)))+geom_line()
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-60-894c9b93d91b> in <module>() ----> 1 qplot(y=D, x=xrange(len(D)))+geom_line() TypeError: object of type 'ARResultsWrapper' has no len()