compute_cumcount_effect_ci.Rd
Computes confidence intervals for cumulative count estimates using the influence curve or supplied bootstrap replicates to estimate standard errors.
compute_cumcount_effect_ci(
obj,
alpha = 0.05,
ic = FALSE,
count_time = NULL,
ref = 1,
effect_measure_type = "CD",
boot_method = "normal"
)
A cumcount
object containing the count estimates, e.g., as computed by estimate_ipwcount
The desired nominal significance level of the confidence intervals.
If the supplied object contains a bootstrap count estimates, setting ic = TRUE will requests that estimated standard errors be derived from the influence curve.
The time at which the cumulative count estimates should be returned (the default value NULL returns all times)
The category to use as the reference for count difference calculations.
A string identifying the type of effect measure to
be computed from among the following options: "CD"
(count difference) or
"CR"
(count ratio). Note that when obj
was created using bootstrap
estimation and boot_method
is "log-normal"
, then only effect measures
with support on the positive real line can be used (i.e. "CR"
). See the
Effect measure types section for the definitions of the various effect
measures.
The specific bootstrap approach used to compute confidence
intervals (default method = "normal" for a normal approximation on the risk
scale, other choices include "log-normal" for normal approximation on the
log scale). When obj
was created without using bootstrap estimation then
the value of boot_method
is ignored. Note that when obj
was created
using bootstrap estimation and boot_method
is "log-normal"
, then only
effect measures specified via effect_measure_type
with support on the
positive real line can be used.
A matrix containing the cumulative count and confidence interval for each time point and treatment group.
Mean: \(\mathrm{E}[Y^{1}] - \mathrm{E}[Y^{0}]\)
Variance with IPW: \( \mathrm{Var}[Y^{1}] + \mathrm{Var}[Y^{0}] + \frac{2}{n} \mathrm{E}[Y^{1}] \, \mathrm{E}[Y^{0}] \)
Variance otherwise: \(\mathrm{Var}[Y^{1}] + \mathrm{Var}[Y^{0}]\)
Mean: \(\frac{\mathrm{E}[Y^{1}]}{\mathrm{E}[Y^{0}]}\)
Variance with IPW: \( \frac{\mathrm{Var}[Y^{1}]}{(\mathrm{E}[Y^{0}])^{2}} + \frac{\mathrm{Var}[Y^{0}]\,(\mathrm{E}[Y^{1}])^2} {(\mathrm{E}[Y^{0}])^{4}} + \frac{2\,(\mathrm{E}[Y^{1}])^2}{n\,(\mathrm{E}[Y^{0}])^2} \)
Variance otherwise: \( \frac{\mathrm{Var}[Y^{1}]}{(\mathrm{E}[Y^{0}])^{2}} + \frac{\mathrm{Var}[Y^{0}]\,(\mathrm{E}[Y^{1}])^2} {(\mathrm{E}[Y^{0}])^{4}} \)