Check the input values of function parameters for errors.
checkInputs(ftime, ftype, trt, adjustVars, t0 = max(ftime[ftype > 0]),
SL.ftime = NULL, SL.ctime = NULL, SL.trt = NULL,
glm.ftime = NULL, glm.ctime = NULL, glm.trt = "1",
returnIC = TRUE, returnModels = TRUE,
ftypeOfInterest = unique(ftype[ftype != 0]),
trtOfInterest = unique(trt), method = "hazard", bounds = NULL,
verbose = FALSE, tol = 1/(length(ftime)), maxIter = 100,
Gcomp = FALSE)A numeric vector of failure times. Right-censored observations
should have corresponding ftype set to 0.
A numeric vector indicating the type of failure. Observations
with ftype == 0 are treated as right-censored. Each unique
value besides zero is treated as a separate type of failure.
A numeric vector indicating observed treatment assignment. Each
unique value will be treated as an (unordered) separate type of
treatment. Currently, only two unique values of trt are
supported.
A data.frame of adjustment variables that will be
used in estimating the conditional treatment, censoring, and failure
(hazard or conditional mean) probabilities.
The time at which to return cumulative incidence estimates. By
default this is set to max(ftime).
A character vector or list specification to be passed to the
SL.library argument in the call to SuperLearner for the
outcome regression (either cause-specific hazards or conditional mean).
See ?SuperLearner for more information on how to specify valid
SuperLearner libraries. It is expected that the wrappers used
in the library will play nicely with the input variables, which will
be called "trt" and names(adjustVars).
A character vector or list specification to be passed to the
SL.library argument in the call to SuperLearner for the
estimate of the conditional hazard for censoring. It is expected that
the wrappers used in the library will play nicely with the input
variables, which will be called "trt" and
names(adjustVars).
A character vector or list specification to be passed to the
SL.library argument in the call to SuperLearner for the
estimate of the conditional probability of treatment. It is expected
that the wrappers used in the library will play nicely with the input
variables, which will be names(adjustVars).
A character specification of the right-hand side of the
equation passed to the formula option of a call to glm
for the outcome regression (either cause-specific hazards or
conditional mean). Ignored if SL.ftime != NULL. Use "trt"
to specify the treatment in this formula (see examples). The formula
can additionally include any variables found in
names(adjustVars).
A character specification of the right-hand side of the
equation passed to the formula option of a call to glm
for the estimate of the conditional hazard for censoring. Ignored if
SL.ctime != NULL. Use "trt" to specify the treatment in
this formula (see examples). The formula can additionally include any
variables found in names(adjustVars).
A character specification of the right-hand side of the
equation passed to the formula option of a call to glm
for the estimate of the conditional probability of treatment. Ignored
if SL.trt != NULL. By default set to "1", corresponding to
using empirical estimates of each value of trt. The formula can
include any variables found in names(adjustVars).
A boolean indicating whether to return vectors of influence
curve estimates. These are needed for some post-hoc comparisons, so it
is recommended to leave as TRUE (the default) unless the user
is sure these estimates will not be needed later.
A boolean indicating whether to return the
SuperLearner or glm objects used to estimate the
nuisance parameters. Must be set to TRUE if the user plans to
use calls to timepoints to obtain estimates at times other
than t0. See ?timepoints for more information.
An input specifying what failure types to compute
estimates of incidence for. The default value computes estimates for
values unique(ftype). Can alternatively be set to a vector of
values found in ftype.
An input specifying which levels of trt are of
interest. The default value computes estimates for values
unique(trt). Can alternatively be set to a vector of values
found in trt.
A character specification of how the targeted minimum
loss-based estimators should be computer, either "mean" or
"hazard". The "mean" specification uses a closed-form
targeted minimum loss-based estimation based on the G-computation
formula of Bang and Robins (2005). The "hazard" specification
uses an iteratively algorithm based on cause-specific hazard functions.
The latter specification has no guarantee of convergence in finite
samples. The convergence can be influenced by the stopping criteria
specified in the tol. Future versions may implement a closed
form version of this hazard-based estimator.
A list of bounds.
A boolean indicating whether the function should print messages to indicate progress.
The stopping criteria when method = "hazard". The algorithm
will continue performing targeting updates to the initial estimators
until the empirical mean of the efficient influence function is
smaller than tol. The default (1/length(ftime)) is a
sensible value. Larger values can be used in situations where
convergence of the algorithm is an issue; however, this may result in
large finite-sample bias.
A maximum number of iterations for the algorithm when
method = "hazard". The algorithm will iterate until either the
empirical mean of the efficient influence function is smaller than
tol or until maxIter iterations have been completed.
A boolean indicating whether to compute the G-computation
estimator (i.e., a substitution estimator with no targeting step).
Note, theory does not support inference for the G-computation
estimator if Super Learner is used to estimate failure and censoring
mechanisms. Only implemented for method = "mean".
Options to be passed to mean_tmle or hazard_tmle.