asdf
asdf

Reputation: 846

Why is unexpected keyword argument 'typ' error thrown?

For typical integer values of p, d, q and a list of numbers, rollRate, the following code:

fit = statsmodels.api.tsa.ARIMA(rollRate, (p,d,q)).fit()
forecast = fit.predict(start=len(rollRate),
                       end = len(rollRate)+11,
                       typ = 'levels')

produces an error that I don't understand:

File "C:...\Anaconda3\lib\site-packages\statsmodels\base\wrapper.py", line 92, in wrapper return data.wrap_output(func(results, *args, **kwargs), how)

TypeError: predict() got an unexpected keyword argument 'typ'

I have also successfully predicted with other list variables, but this particular list is giving me an error. Any idea as to why predict() isn't accepting typ as a keyword argument when the source code says that it can?

Upvotes: 5

Views: 3210

Answers (1)

jseabold
jseabold

Reputation: 8283

Ah, I see the issue. You don't have an ARIMA model. You have an ARMA model because d=0. ARMA.predict doesn't take a typ keyword argument because they don't need one.

Upvotes: 3

Related Questions