compute_cumrisk_ci is a function that computes confidence intervals for cumulative risk estimates using the influence curve or supplied bootstrap replicates to estimate standard errors.

compute_cumrisk_ci(
  obj,
  alpha = 0.05,
  ic = FALSE,
  risk_time = NULL,
  boot_method = "log-normal"
)

Arguments

obj

A cumrisk object containing the risk estimates, e.g., as computed by estimate_ipwrisk

alpha

The desired nominal significance level of the confidence intervals.

ic

If the supplied object contains a bootstrap risk estimates, setting ic = TRUE will requests that estimated standard errors be derived from the influence curve.

risk_time

The time at which the cumulative risk estimates should be returned (the default value NULL returns all times)

boot_method

The specific bootstrap approach used to compute confidence intervals. Options are "log-normal" (default; normal approximation on the log scale), "normal" (normal approximation on the risk scale), "percentile" (percentile-based approach using quantiles of the bootstrap distribution), and "basic" (basic bootstrap using the reflection method). When obj was created without using bootstrap estimation or ic = TRUE is provided then the value of boot_method is ignored.

Value

A matrix containing the cumulative risk and confidence interval for each time point and treatment group.

Author

M. Alan Brookhart