Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why ImportError: cannot import name 'AutoReg' from 'statsmodels.tsa.ar_model' occuring?

I am trying to do MLE regression using AR(p) by importing the module from statsmodels.tsa.ar_model import AutoReg, ar_select_order, but this ImportError keeps coming. How to solve this? Is there any other way I can do Autoregression in Python?

like image 765
Asad Tan Avatar asked Feb 24 '20 03:02

Asad Tan


2 Answers

AutoReg is a newer version of the previous AR model, it is only available in statsmodels with version >= 0.11.1. You may check your statsmodels version. If it is lower, you may do

pip install statsmodels --upgrade
like image 99
user3029790 Avatar answered Nov 20 '22 08:11

user3029790


do pip install statsmodels --upgrade and restart the environment.

like image 23
Saurabh Kumar Avatar answered Nov 20 '22 08:11

Saurabh Kumar