get_data.default()
to fall back on backup procedure in case of malformed model.frame()
output
#624
Labels
Bug 🐛
Something isn't working
Hello,
In
get_data.default()
, if the call tomodel.frame()
fails, a backup procedure is enacted, i.e.,insight/R/get_data.R
Lines 62 to 73 in 878b3ae
However, this only gets triggered when
mf
returnsNULL
, i.e., whenmodel.frame()
returns an error. In some cases,model.frame()
may return a malformed data frame, e.g., one with zero rows, which is then missed by the backup procedure.As an example, consider running
get_data()
on the output ofestimatr::iv_robust()
, which, due to a bug, returns a malformed dataset whenmodel.frame()
is called on the output (as ofestimatr
v1.0.0):Created on 2022-08-29 with reprex v2.0.2
I have already submitted an issue with the
estimatr
team, but a fix might be more useful in general.The text was updated successfully, but these errors were encountered: