I would like to estimate a Markov Switching Model as done in the following: http://www.chadfulton.com/posts/mar_hamilton.html
However, when I try to import the function to fit the model, i.e.
from statsmodels.tsa.mar_model import MAR
I get the following error message:
ImportError: No module named 'statsmodels.tsa.mar_model'
What can I do to solve this error?