Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for three-part formula RHS in iv_robust #376

Open
grantmcdermott opened this issue Feb 6, 2021 · 1 comment
Open

Support for three-part formula RHS in iv_robust #376

grantmcdermott opened this issue Feb 6, 2021 · 1 comment

Comments

@grantmcdermott
Copy link

As noted in #365, the AER package has been superseded by a dedicated ivreg package (link). My suggestion here is based on the idea that it would be keep to keep a consistent syntax between estimatr and its "base" counterpart(s). With that in mind...

On cool feature introduced in the upcoming 0.6.0 release of ivreg is support for a three-part formula RHS:

y ~ ex | en | in

where ex is exogenous variables, en is endogenous variables, and in is instruments. In my view, this is a much more natural way of expressing the IV syntax than the old two-part formula (which is nonetheless still supported):

y ~ ex + en | ex + in

At the very least, the three-part syntax cuts down on typing since you don't have to write out the ex vars twice. It's also closer to the IV syntax used by fixest::feols() and lfe::felm(), as well as the equivalent Stata routines.

Thanks for considering.

@lukesonnet
Copy link
Contributor

Hi Grant,

I think this is a good suggestion. I'm wary about breaking old code so I'll want to see if there's a way to do this that is "smart" enough. I'd think so given we rely on the Formula package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants