4

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

jalazbe
  • 1,801
  • 3
  • 19
  • 40
Chaymae Ahmed
  • 371
  • 1
  • 4
  • 14

1 Answers1

9

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.

stellasia
  • 5,372
  • 4
  • 23
  • 43
  • The new link to package structure documentation is [here](https://www.statsmodels.org/stable/api-structure.html) – ivan Aug 17 '20 at 10:49