| plot.birp | R Documentation |
Plots the posterior densities of the rate (gamma) and/or step change (Delta) parameters estimated by a birp object.
## S3 method for class 'birp'
plot(
x,
change = if (x$post_gamma$exists && x$post_Delta$exists) "both" else if
(x$post_gamma$exists) "rate" else "step",
shadingIncrease = NA,
shadingDecrease = "#f2c7c7",
col = "black",
lwd = 1,
lty = NULL,
xlim = NA,
ylim = NA,
add = FALSE,
xlab = NULL,
ylab = "Posterior density",
legend = NULL,
lineAtZero = TRUE,
...
)
x |
A |
change |
Character; which parameters to plot. One of |
shadingIncrease |
Character or color specification; Shading color for the range where the
parameter is greater than 0. If |
shadingDecrease |
Character or color specification; Shading color for the range where the
parameter is less than 0. If |
col |
Character vector or color values; Line color(s) for the density plots. Recycled
per parameter type. Default is |
lwd |
Numeric vector; Line width(s) for the density plots. Recycled per parameter type.
Default is |
lty |
Numeric or character vector; Line type(s) for the density plots. If a single value
is provided, it is recycled. Default cycles through |
xlim |
Numeric vector of length 2; Optional x-axis limits applied to all panels.
If |
ylim |
Numeric vector of length 2; Optional y-axis limits applied to all panels.
If |
add |
Logical; If |
xlab |
Character (or expression) vector of length 1 or 2; Label(s) for the x-axis.
When |
ylab |
Character; Label for the y-axis. Default is |
legend |
Character vector of legend labels, or |
lineAtZero |
Logical; If |
... |
Additional graphical parameters passed to |
No return value, called for side effects.
birp
data <- simulate_birp(timepoints = 1:5)
est <- birp(data, change = "both")
plot(est)
plot(est, change = "rate")
plot(est, change = "step")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.