.plot_matrix {BayesFBHborrow} | R Documentation |
Plot smoothed baseline hazards
Description
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.
Usage
.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"
)
Arguments
x_lim |
time grid |
y |
samples |
percentiles |
percentiles to include in plot, default is c(0.025, 0.975) |
title |
optional, add title to plot |
xlab |
optional, add xlabel |
ylab |
optional, add ylabel |
color |
color of the mid line, default is blue |
fill |
color of the percentiles, default is blue |
linewidth |
thickness of the plotted line, default is 1 |
alpha |
opacity of the percentiles, default is 0.2 |
y2 |
(optional) second set of samples for comparison |
color2 |
(optional) color of the mid line, default is red |
fill2 |
(optional) color of the percentiles, default is red |
Value
a ggplot2 object
[Package BayesFBHborrow version 2.0.1 Index]