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

compute_cumcount_ci(
  obj,
  alpha = 0.05,
  ic = FALSE,
  count_time = NULL,
  boot_method = "log-normal"
)

Arguments

obj

A cumcount object containing the count estimates, e.g., as computed by estimate_ipwcount

alpha

The desired nominal significance level of the confidence intervals.

ic

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

count_time

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

boot_method

The specific bootstrap approach used to compute confidence intervals (default method = "log normal" for normal approximation on the log scale, other choices include "percentile" for the percentile-based approach, and "normal" for a normal approximation on the count scale).

Value

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

Author

M. Alan Brookhart & Alexander Breskin