boot_icer | R Documentation |
Performs non-parametric bootstrap resampling to estimate the distribution of the Incremental Cost-Effectiveness Ratio (ICER) between a treatment and control group.
boot_icer(formula, data, ref, R = 1000, ci.type = "bca")
formula |
A formula of the form |
data |
A data frame containing the variables in the formula. |
ref |
The reference group label in the |
R |
Number of bootstrap replications. Default is 1000. |
ci.type |
Type of confidence interval to compute with |
This function takes a formula of the form cost + effect ~ group
and computes
bootstrap replicates of incremental cost and effect differences, as well as their ratio (ICER).
Confidence intervals for each component are derived using the bias-corrected and accelerated (BCa) method.
An object of class boot_icer
, which contains:
A data frame with estimates, standard errors, bias, and confidence intervals for Delta Cost, Delta Effect, and ICER.
A matrix of bootstrap replicates: one row per sample, with columns for Delta Cost, Delta Effect, and ICER.
The original formula used.
The reference group.
The matched call.
The object supports a custom summary()
method.
set.seed(123)
df <- data.frame(
c = c(rnorm(100, 500, 100), rnorm(100, 600, 120)),
e = c(rnorm(100, 0.6, 0.05), rnorm(100, 0.65, 0.06)),
g = rep(c("control", "treatment"), each = 100)
)
res <- boot_icer(c + e ~ g, data = df, ref = "control", R = 500)
summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.