Closed bbolker closed 12 months ago
Thanks for documenting the current state of these tidiers + a workaround! Saw that SO post this morning—I'm glad your effort is findable on the repo now, too.
With an eye for the maintenance guidelines of the package, we won't be merging in support for these model objects. I appreciate you bringing this up, though.
The answer re: your note on the SO post:
(I don't know why it doesn't use standard S3 inheritance rules?)
is in your issue description here. AER::tobit
output dispatches to the survreg tidier but still has subclass tobit
, resulting in the error on the issue you've linked:
# tidier from 2019 and before
broom::tidy(m1)
#> Error in if (!is.null(newnames) && length(newnames) != ncol(x)) {: missing value where TRUE/FALSE needed
We set that method for the subclass so that users get a more informative error.
Thanks. I think I realized the answer to my question partway through composing the issue but failed to update the SO post.
Thanks for the pointer to the maintenance guidelines: that makes sense. I guess someone should approach the AER
maintainers.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
As discussed on Stack Overflow and on this closed issue, there's not currently a tidier for
tobit
models (from theAER
package). (This commit "solved" the problem of an obscure error message by settingtidy.tobit <- tidy.default
, which leads to an interpretable rather than an uninterpretable error message). This appears to be solvable by a small workaround:Example:
The reason this works is that the
tidy.survreg
tidier depends on the output ofsummary()
having a$table
component.AER::summary.tobit()
does not have such a component, butsurvival::summary.survreg
does ...