statsmodles AR model error when calling params

两盒软妹~` 提交于 2019-12-13 06:12:08

问题


New to statsmodels, trying to use statsmodels.tsa.ar_model to fit a pandas timeseries.

#pull one series from dataframe
y=data.sentiment
armodel=sm.tsa.ar_model.AR(y, freq='D').fit()
armodel.params()

gets the following error:

C:\Python27\lib\site-packages\pandas\lib.pyd in pandas.lib.SeriesIndex.__set__ (pandas\lib.c:27817)()
AssertionError: Index length did not match values

Any ideas?


回答1:


You should upgrade to current master, if you can. This was fixed here.



来源:https://stackoverflow.com/questions/16128116/statsmodles-ar-model-error-when-calling-params

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!