Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 832
Chaymae Ahmed Avatar asked Oct 15 '25 08:10

Chaymae Ahmed


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.

like image 79
stellasia Avatar answered Oct 17 '25 00:10

stellasia