Survival-function predictions for time-to-event endpoints
Description
For a model with one or more [event_model] (TTE) endpoints, evaluates the survival function \(S(t)\), cumulative hazard \(H(t)\) and hazard \(h(t)\) on a user-supplied time grid, for every subject and every TTE CMT. Population-level (\(\eta = 0\)) unless a fit is supplied, in which case its fitted theta is used. Each subject also carries its median and mean survival time (analytic where available).
Usage
ferx_predict_survival(model, data, times, fit = NULL)Arguments
model: Path to a .ferx model file containing at least one[event_model]block.data: Path to a NONMEM-format CSV.times: Numeric vector of times at which to evaluate \(S(t)\), \(H(t)\), \(h(t)\).fit: Optionalferx_fitresult. When provided, predictions usefit$thetainstead of the model file’s initial theta.
Details
For a model with multiple TTE CMTs (competing risks), each row also carries the cause-specific cumulative incidence cif (\(F_k(t)\)) and the all-cause survival survival_all (\(S_\mathrm{all}(t)\)), with \(\sum_k F_k(t) + S_\mathrm{all}(t) = 1\). For a single endpoint cif\(= 1 -\)survival and survival_all\(=\)survival.
Seealso
Other simulation: [ferx_npde](ferx_npde.qmd)(), [ferx_predict](ferx_predict.qmd)(), [ferx_simulate](ferx_simulate.qmd)(), [ferx_simulate_adaptive](ferx_simulate_adaptive.qmd)(), [ferx_simulate_with_uncertainty](ferx_simulate_with_uncertainty.qmd)()
Concept
simulation
Value
A data.frame with columns: ID, CMT, TIME, survival, cum_hazard, hazard, cif, survival_all, median_survival, mean_survival (one row per subject \(\times\) TTE CMT \(\times\) time).
Examples
# `model` must contain at least one [event_model] (TTE) block.
preds <- ferx_predict_survival(
"tte_model.ferx", "tte_data.csv",
times = seq(0, 24, by = 2)
)
head(preds)