Closed kylebutts closed 5 months ago
@kylebutts this is actually very easy for me to fix upstream. The functions in charge of extracting these statistics are in fact hosted in the modelsummary
package. If you install from Github and restart R
, your example should then work:
remotes::install_github("vincentarelbundock/modelsummary")
My view is that it might be best not to do a bunch of automatic type conversion in mice
, so IMHO this issue can probably be closed.
Thanks @vincentarelbundock! Glad I pinged you :-)
The use of
bind_rows
instead of something likedo.call("rbind", x)
is causing errors with themarginaleffects
package. Basically,broom::glance(marginaleffects::hypotheses(...))
contains thelogLik
column of classlogLik
class. Usingc()
onlogLik
converts the column to a double whichvctrs
reports as an error. This breaks themira
code here: https://github.com/amices/mice/blob/99bd724eac99ae44a3b7e8b2b5da0f2ddd264ec6/R/summary.R#L25-L27A simple fix could be (but this could cause other bugs with silent column conversions):
Alternatively, could do:
FYI, @vincentarelbundock. This might be a thing you could change on your end? E.g.
logLik
of type double andlogLik_df
storingattr(logLik, "df")
?Reprex: