boot_icer: Bootstrap Estimation of Incremental Cost-Effectiveness Ratio...

View source: R/boot_icer.R

boot_icerR Documentation

Bootstrap Estimation of Incremental Cost-Effectiveness Ratio (ICER)

Description

Performs non-parametric bootstrap resampling to estimate the distribution of the Incremental Cost-Effectiveness Ratio (ICER) between a treatment and control group.

Usage

boot_icer(formula, data, ref, R = 1000, ci.type = "bca")

Arguments

formula

A formula of the form cost + effect ~ group, where cost and effect are numeric variables, and group is a factor variable indicating treatment assignment.

data

A data frame containing the variables in the formula.

ref

The reference group label in the group variable (typically "control").

R

Number of bootstrap replications. Default is 1000.

ci.type

Type of confidence interval to compute with boot.ci(). Default is "bca".

Details

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.

Value

An object of class boot_icer, which contains:

summary

A data frame with estimates, standard errors, bias, and confidence intervals for Delta Cost, Delta Effect, and ICER.

boot_dist

A matrix of bootstrap replicates: one row per sample, with columns for Delta Cost, Delta Effect, and ICER.

formula

The original formula used.

ref

The reference group.

call

The matched call.

The object supports a custom summary() method.

Examples

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)


ielbadisy/CEACT documentation built on June 11, 2025, 9:19 p.m.