Generate Kaplan-Meier curves with prediction intervals from parametric bootstrap simulation
calc_km_pi(
sim,
trt = NULL,
group = NULL,
pi.range = 0.95,
calc.obs = TRUE,
simtimelast = NULL
)
A `survparamsim` class object generated by surv_param_sim
function.
An optional string to specify which column define treatment status.
You will have survival curves with different colors in plot_km_pi
function.
Optional string(s) to specify grouping variable(s).
You will have faceted survival curves for these variables in plot_km_pi
function.
Prediction interval for simulated survival curves.
A logical to specify whether KM estimates will be performed for the observed data. Need be set as FALSE if survival information in the `newdata`` is dummy.
An optional numeric to specify last simulation time for survival curve. If NULL (default), the last observation time in the `newdata`` will be used.