简体   繁体   中英

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM