Compute overall cumulative incidences at multiple timepoints
Source:R/compute_psi_bar.R
compute_psi_bar_times.RdWrapper that computes cumulative incidences at multiple
timepoints. Calls compute_psi_bar_t0() internally for each timepoint.
Models are fitted once before calling this function to allow efficient evaluation
at multiple timepoints without refitting.
Arguments
- fit_0
A fitted model returned from
fit_model_0()- fit_1
A fitted model returned from
fit_model_1()- exposure_time
Name of the time-to-exposure variable in
newdata. Used to compute \(\psi_0(t_0; d,x)\) where \(d + \tau\) and \(d + t_0\) are needed.- tau
Delay period
- newdata
New data at which to do predictions.
Value
A matrix of estimates where the columns are the terms cuminc_0 and cuminc_1,
and the rows are the time points of interest.
Details
This function expects models already fitted via fit_model_0() and
fit_model_1(). It performs G-computation by predicting and marginalizing over
conditional risks.