wwrechard/pydlm

AutoRegression failing with lag value >1

gcgibson opened this issue · 2 comments

When running

simple_dlm = dlm(data) + autoReg(degree=3, data=data, name='ar3', w=1.0)
simple_dlm.fit()

I get

Traceback (most recent call last):
  File "final.py", line 81, in <module>
    simple_dlm.plotPredictN(date=780, N=51)
  File "/Users/gcgibson/anaconda/lib/python2.7/site-packages/pydlm/dlm.py", line 1139, in plotPredictN
    N=N, date=date, featureDict=featureDict)
  File "/Users/gcgibson/anaconda/lib/python2.7/site-packages/pydlm/dlm.py", line 379, in predictN
    (obs, var) = self.continuePredict(featureDict=featureDictOneDay)
  File "/Users/gcgibson/anaconda/lib/python2.7/site-packages/pydlm/dlm.py", line 328, in continuePredict
    return self._continuePredict(featureDict=featureDict)
  File "/Users/gcgibson/anaconda/lib/python2.7/site-packages/pydlm/func/_dlm.py", line 441, in _continuePredict
    extra = comp.d - len(self.predictStatus[2])
AttributeError: dlm instance has no attribute 'predictStatus'

however, setting ar=1 seems to work fine.

Awesome thanks! It works!