I am trying to replicate an eviews code in Python. I need to fit a regression with a constant, some endogeneous variables that I instrumentalize and some exogeneous variables. The dependant variable is LR_ (long rate of a country). I do that for multiple countries.
In eviews, the function looks like that:
equation {%eq_name}.TSLS(COV=HAC,M=2000,C=1e-06) LR_{%country} c SR_{%country} INF_{%country} GDP_{%country} LR_W_{%country} AR(1 to !order_ar) @ instr_list_{%country}
where instr_list_ contains a bunch of variables.
But as you see, there is the AR(1 to !order_ar) parameters in eviews that allow me to specify that the error term for a given country has an AR(1) structure.
Can I do the same using IV2SLS function of the statsmodel package in Python?
Thank you