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

Lean = TRUE not working with interacted IV #123

Closed
adamaltmejd opened this issue Apr 7, 2021 · 1 comment
Closed

Lean = TRUE not working with interacted IV #123

adamaltmejd opened this issue Apr 7, 2021 · 1 comment

Comments

@adamaltmejd
Copy link

Hey! Just found a bug running interacted IV, following up on this discussion: #99

data(base_did)
base_did$takeup <- rbinom(nrow(base_did), 1, 0.5)
# est_did = feols(y ~ x1 | id + period | i(takeup, period, 5) ~ i(treat, period, 5), base_did) #works
est_did = feols(y ~ x1 | id + period | i(takeup, period, 5) ~ i(treat, period, 5), base_did, lean = TRUE)
Error in `colnames<-`(`*tmp*`, value = paste0("fit_", iv_lhs_names)) : 
  attempt to set 'colnames' on an object with less than two dimensions
@lrberge
Copy link
Owner

lrberge commented Apr 7, 2021

Thanks! It actually occurred whenever the IV estimation contained FEs!
Big thanks for the reproducible example => quick to fix!
(Confession: sometimes I really feel like Sisyphus!)

@lrberge lrberge closed this as completed Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants