Plot Survival Curves
Usage
plot_survival_curves(
calibration = exampleCalibration(),
stratum = NULL,
marginal = TRUE,
t = 1:100,
col = NULL,
...,
args = NULL
)
Arguments
- calibration
calibration object
- stratum
name of stratum
- marginal
logical. If
TRUE
(default) the marginal survival curves are plotted, otherwise the non-marginal survival curves- t
vector of times at which to calculate the survival curves
- col
vector of colour names, named according to the conditions as stored in
attr(calibration, "parameters")$conditions
- ...
arguments passed to
plot_curve_areas_gg
, such aslegend
,line_colour
- args
arguments passed to get_survivals
Examples
if (FALSE) {
# Get the example calibration provided with the Gompitz software
calibration <- kwbGompitz::exampleCalibration()
# Generate one ggplot2-object for each calibrated stratum
(plots_1 <- plot_survival_curves(calibration))
# By default the marginal survival curves are shown. You may set marginal to
# FALSE to get the non-marginal survival curves
(plots_2 <- plot_survival_curves(calibration, marginal = FALSE))
# Compare the plots
gridExtra::grid.arrange(plots_1[[1]], plots_2[[1]], plots_1[[2]], plots_2[[2]])
}