Skip to content

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

@oskasf

Description

@oskasf

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions