6

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?

Asad Tan
  • 79
  • 1
  • 1
  • 7

2 Answers2

8

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
user3029790
  • 311
  • 1
  • 8
  • 2
    I am still getting the error described in the post after upgrading. Do you have any other ideas as to why this is happening? – Dispersion Mar 21 '20 at 20:56
  • 1
    After upgrading statsmodels package, restarting the Python environment I am working helped in my case. – Orhan Celik Sep 29 '20 at 12:38
2

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

Saurabh Kumar
  • 129
  • 1
  • 8