module 'statsmodels.tsa.api' has no attribute 'arima_model'

Viewed 8926

I'm trying to use "statsmodels.api" to work with time series data and trying to fit a simple ARIMA model using

sm.tsa.arima_model.ARIMA(dta,(4,1,1)).fit()

but I got the following error

module 'statsmodels.tsa.api' has no attribute 'arima_model'

I'm using 'statsmodels' version 0.9.0 with 'spyder' version 3.2.8 I'd be pleased to get your help thanks

1 Answers

The correct path is :

import statsmodels.api as sm
sm.tsa.ARIMA()

You can view it using a shell that allows autocomplete like ipython.

It is also viewable in the example provided by statsmodels such as this one.

And more informations about package structure may be found here.

Related