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

Add option for exponentiate in tidy output of boot::boot #1039

Closed
oskasf opened this issue Aug 13, 2021 · 3 comments
Closed

Add option for exponentiate in tidy output of boot::boot #1039

oskasf opened this issue Aug 13, 2021 · 3 comments

Comments

@oskasf
Copy link

oskasf commented Aug 13, 2021

Hey, really lovel the package! I was just wondering if an option to exponentiate bootstrap coefficients from a boot::boot output when tidying the output could be added?

I am trying to bootstrap estimates and confidence intervals for a quasipoisson model. This feature is implemented for other tidy methods and it'd be great if it worked for bootstrap outputs.

For example:

data(mtcars)

form <- as.formula(mpg ~ wt)

bs_fun <- function(formula, data, ind){
  d <- data[ind,]
  
  fit <- glm(formula,
             data = d,
             family = quasipoisson)
  
  return(coef(fit))
}

boot_output <- boot::boot(statistic = bs_fun, R = 10, formula = form, 
           data = mtcars)

# Currently returns "raw" coefficients
tidy(boot_output, exponentiate = TRUE, conf.int = TRUE)

Thanks!

@simonpcouch
Copy link
Collaborator

Thanks for the issue! I'm on board for this and would be glad to review a PR implementing this——see the exponentiate() idiom in other tidiers for a guide. :-)

@simonpcouch
Copy link
Collaborator

Thanks for the issue! Went ahead and made this happen as I tackled other similar issues—I appreciate your patience here. Closing #1040 in favor of 47c2485.

@github-actions
Copy link

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 Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants