asheshrambachan / HonestDiD

Robust inference in difference-in-differences and event study designs
Other
175 stars 45 forks source link

Pull Request for #47: Error with some vcov matrices #48

Closed mcaceresb closed 1 year ago

mcaceresb commented 1 year ago

This fixes #47. The issue was .lp_conditional_test_fn, which checks for the rank of a matrix. However, this matrix can have 0 rows, causing the code to crash. I just added a check that sets fullRank_flag=FALSE if it detects a 0-dimensional matrix.

@jonathandroth Should be a small straightforward change. LMK if it looks fine.

jonathandroth commented 1 year ago

Looks good to me, thanks!