envelope {jagshelper} | R Documentation |
Envelope plot
Description
Envelope plot of the posterior densities of a vector of parameter nodes, in which the sequential order of nodes is important, such as a time series.
This produces a plot of overlayed shaded strips, each corresponding to a given interval width (defaults to 50 percent and 95 percent), with an overlayed median line.
Usage
envelope(
df,
p = NULL,
x = NA,
row = NULL,
column = NULL,
median = TRUE,
ci = c(0.5, 0.95),
col = 4,
add = FALSE,
dark = 0.3,
outline = FALSE,
xlab = "",
ylab = "",
main = NULL,
ylim = NULL,
transform = c("none", "exp", "expit"),
...
)
Arguments
df |
Output object returned from |
p |
Parameter name, if input to |
x |
Vector of X-coordinates for plotting. |
row |
Row to subset, in the case of a 2-d matrix of parameter nodes in-model. |
column |
Column to subset, in the case of a 2-d matrix of parameter nodes in-model. |
median |
Whether to include median line |
ci |
Vector of intervals to overlay. Defaults to 50 percent and 95 percent. |
col |
Color for plotting |
add |
Whether to add to existing plot |
dark |
Opacity (0-1) for envelopes. Note that multiple overlapping intervals will darken the envelope. |
outline |
Whether to just envelope outlines |
xlab |
X-axis label |
ylab |
Y-axis label |
main |
Plot title. If the default ( |
ylim |
Y-axis limits for plotting. If the default ( |
transform |
Should the y-axis be (back)transformed? Options are |
... |
additional plotting arguments or arguments to |
Value
NULL
Author(s)
Matt Tyers
See Also
Examples
## usage with input data.frame
trend <- jags_df(SS_out, p="trend")
envelope(trend, x=SS_data$x)
## usage with jagsUI object
envelope(SS_out, p="trend")
## usage with 2-d jagsUI object
envelope(SS_out, p="cycle_s", column=1, main="cycle")
envelope(SS_out, p="cycle_s", column=2, col=2, add=TRUE) ## overlay
## scale transformation
envelope(SS_out, p="trend", transform="exp", ylab="exp transform")
envelope(SS_out, p="trend", transform="exp", ylab="exp transform", log="y")