Plot mean and given quantiles of a matrix. Can also be used to plot derivatives of the baseline hazard, such as estimated cumulative hazard and survival function.
.plot_matrix(
x_lim,
y,
percentiles = c(0.05, 0.95),
title = "",
xlab = "",
ylab = "",
color = "blue",
fill = "blue",
linewidth = 1,
alpha = 0.2,
y2 = NULL,
color2 = "red",
fill2 = "red"
)a ggplot2 object
time grid
samples
percentiles to include in plot, default is c(0.025, 0.975)
optional, add title to plot
optional, add xlabel
optional, add ylabel
color of the mid line, default is blue
color of the percentiles, default is blue
thickness of the plotted line, default is 1
opacity of the percentiles, default is 0.2
(optional) second set of samples for comparison
(optional) color of the mid line, default is red
(optional) color of the percentiles, default is red