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

Adding tidiers for regression models not currently covered by broom #505

Closed
1 of 9 tasks
IndrajeetPatil opened this issue Oct 4, 2018 · 12 comments
Closed
1 of 9 tasks

Comments

@IndrajeetPatil
Copy link
Contributor

IndrajeetPatil commented Oct 4, 2018

Here are some commonly used (class of) regression models that broom currently doesn't support but would be lovely if it does.

(I will keep updating this list as I find new, unsupported regression models.)

Unless somebody else does it first, I will also try to do a PR with these tidiers.

@dgrtwo
Copy link
Collaborator

dgrtwo commented Oct 4, 2018

Interesting: we have implementations for lmRob and glmRob from the robust package (though they're basically thin wrappers for the lm tidiers), but I hadn't heard of the lowercase versions. Sounds useful!

@bbolker
Copy link
Contributor

bbolker commented Oct 27, 2018

when you (or someone, maybe me?) does pscl::zeroinfl, (a) worth doing pscl::hurdle at the same time, (b) worth trying to maintain consistency with the conventions in broom.mixed, which already has some zero-inflation support for glmmTMB models ...

@billdenney
Copy link
Contributor

What about tidying the output of optim()? A minor challenge with this is that it returns a list, not a named object class (so, the tidy method would need to look at the list and see if it appeared to be optim() output).

If interested, I'd be happy to generate a PR.

@alexpghayes
Copy link
Collaborator

There currently are tidiers for optim()! Do these work well for you, or do you have suggested changes?

library(broom)

r <- function(x) (3 - x[1])^2 + 4 * (x[2] - x[1]^2)^2
res <- optim(1:2, r)

tidy(res)
#> # A tibble: 2 x 2
#>   parameter  value
#>   <chr>      <dbl>
#> 1 parameter1  3.00
#> 2 parameter2  9.00
glance(res)
#> # A tibble: 1 x 4
#>          value function.count gradient.count convergence
#>          <dbl>          <int>          <int>       <int>
#> 1 0.0000000358            113             NA           0

Created on 2018-11-16 by the reprex package (v0.2.1)

@billdenney
Copy link
Contributor

Whoops! I had broom.mixed not broom loaded. I have an idea for optim() that I'll bring up in a separate issue.

@mattle24
Copy link
Contributor

@IndrajeetPatil I'm working on glance for glmrob objects, but I'm not familiar with the robustbase package. I'm having trouble finding goodness of fit measures to include. Do you have any suggestions? For lmrob objects, I have included r.squared, sigma, and df.residual, but these fields either seem to not exist or are NULL in glmrob.

@IndrajeetPatil
Copy link
Contributor Author

@mattle24 Sorry for the late reply. Completely missed this in the notifications.
I can't find that information as well for glmrob objects, so maybe not much that can be done about that.

@mattle24
Copy link
Contributor

All good, thanks for checking!

@HedvigS
Copy link

HedvigS commented Aug 7, 2019

(I would also love a function for tidying hurdle objects. Thanks for a great package regardless :) )

@lirpa939
Copy link

(I would also love a function for tidying hurdle objects. Thanks for a great package regardless :) )
I would love to see this too!

@IndrajeetPatil
Copy link
Contributor Author

Closing following #795 (comment)

@github-actions
Copy link

github-actions bot commented Mar 8, 2021

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.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants