Ported from multinma's geom_km() (Phillippo et al. 2020). Returns a list of
ggplot2 layers, so it can be added to an existing plot; adding it to
plot_survival() overlays the observed data on the fitted survival curves.
Arguments
- object
A
cmlnmr()fit withfamily = "survival".- ...
Passed to
survival::survfit().- curve_args, cens_args
Optional lists of arguments customizing the curves (
ggplot2::geom_step()) and the censoring marks (ggplot2::geom_point()).
Details
Only right-censored survival data are supported: status 1 is an event and
status 0 is right censoring. Delayed entry is honored when configured on
the fitted model. Curves reconstructed from aggregate event/censoring rows
are labeled as reconstructed AgD and must not be read as observed IPD.
Examples
if (FALSE) {
plot_survival(fit) + geom_km(fit)
}