v0.6: IV Support
Version 0.6 introduces support for IV estimation via 2SLS.
- Syntax for IV estimation unambiguously follows fixest' syntax: you can specify IV estimation via a formula with
depvar ~ exog.vars | fixed effect vars | endog.var ~ instruments
. If no fixed effects is specified, just drop the second part of the formula. - It is possible to estimate over-identified models, but not possible to estimate models with more than one endogenous variable.
- It is also not (yet) possible to combine IV estimation with multiple estimation syntax.
from pyfixest import Fixest
from pyfixest.utils import get_data
data = get_data()
data.head()
fixest = Fixest(data = data)
fixest.feols("Y ~ 1 | X2 | X1 ~ Z1 + Z2")