estimate_aipwrisk.Rd
estimate_aipwrisk
is a function that estimates the cumulative incidence of a
right-censored outcome using an augmented inverse probability weighted estimator.
estimate_aipwrisk(
data,
models,
wt = NULL,
times = NULL,
tau = NULL,
labels = NULL,
subgroup = NULL,
subgroup_ps = TRUE,
wt_type = "i",
trim = NULL,
trunc = NULL,
nboot = 0,
seed = 100,
continuous = TRUE,
tau_censor = FALSE,
fully_efficient = FALSE,
verbose = FALSE
)
The input data frame
A model_specification
object
describing the incoming data,
including the names of the variables containing the outcome (as a time-to-event),
treatment, censoring, and associated models. The outcome and censoring times
should be NA if they are censored). If no identify_missing
statement was
included in the model_specification
, the estimator will default to a complete-case
(listwise deletion) analysis.
An optional vector of pre-computed weights to be applied to the analysis
An optional vector of times at which the risk should be computed. Defaults to all observed event times.
The maximum length of follow-up to consider, estimation will not be performed beyond this point.
vector of strings that are used to describe analysis, used for faceting
An expression indicating which observations to include in the analysis
A logical indicating whether the PS should be re-estimated within the subgroup (default = TRUE)
The type of confounding weight used, "i"=IPTW (default), "n"=IPTW normalized to sum to \(n\) in each treatment group, or a numeric indicating which group to use as a standard in an SMR weight.
A scalar value (between 0 and 0.5) providing the thresholds for symmetrical propensity score trimming. For example, trim = 0.01 will drop observations with propensity scores below to the 1st percentile and above the 99th percentile (default = NULL, no trimming).
A scalar value (between 0 and 1) providing the top percentile at
which to truncate confounding weights. For example, trunc = 0.99 will
truncate all weights above the 99th percentile, i.e., weights larger than
the 99th percentile will be set equal to the 99th percentile (default =
NULL
, no truncation).
The number of bootstrap resamples to generate. Used only if post-estimation bootstrap is used.
A seed for the random number generator to ensure reproducibility of bootstrap replications
Requests continuous bootstrap weights from a Dirichlet versus discrete weights from a multinomial (default = TRUE)
For backward compatabiity before 0.36.17. Treat censoring at end of follow-up (tau) as a censoring event to be included in censoring models? Defaults to FALSE.
use the fully efficient AIPW estimator. WARNING: this process is very computational and memory intensive
show progress
An object that inherits from classes cumrisk
and aipw
that contains information about the estimated risk
function.