This function performs a fluctuation of an initial estimate of the
cause-specific hazard functions using a call to glm
(i.e., a logistic
submodel) or a call to optim
(to ensure fluctuations stay within model
space). The structure of the function is specific to how it is called within
hazard_tmle
. In particular, dataList
must have a very specific
structure for this function to run properly. The list should consist of
data.frame
objects. The first will have the number of rows for each
observation equal to the ftime
corresponding to that observation. The
subsequent entries will have t0
rows for each observation and will set
trt
column equal to each value of trtOfInterest
in turn. The
function will fit a logistic regression with (a scaled version of) Nj
as outcome, the logit of the current (pseudo-) hazard estimate as offset and
the targeted minimum loss-based estimation "clever covariates". The function
then obtains predictions based on this fit on each of the data.frame
objects in dataList
.
fluctuateHazards(dataList, allJ, ofInterestJ, nJ, uniqtrt, ntrt, t0,
verbose, ...)
A list of data.frame
objects.
Numeric vector indicating the labels of all causes of failure.
Numeric vector indicating ftypeOfInterest
that was
passed to hazard_tmle
.
The number of unique failure types.
The values of trtOfInterest
passed to mean_tmle
.
The number of trt
values of interest.
The timepoint at which survtmle
was called to evaluate.
A boolean indicating whether the function should print messages to indicate progress.
Other arguments. Not currently used.
The function returns a list that is exactly the same as the input
dataList
, but with updated columns corresponding with
estimated cumulative incidence at each time and estimated "clever
covariates" at each time.