问题
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