grid_trace2 {spam} | R Documentation |
Two trace plots and a scatter plot.
Description
For two (MCMC) chains of the same length trace plots and a scatter plot are drawn.
Usage
grid_trace2(chain1, chain2 = NULL,
xlim = NULL, ylim1 = NULL, ylim2=NULL,
chain1_lab = "", chain2_lab = "", main = "",
chain1_yaxis_at = NULL, chain2_yaxis_at = NULL,
log = FALSE,
cex_points = unit(0.2, "mm"),
cex_main = unit(1.2, "mm"),
lwd_lines = unit(0.1, "mm"),
lwd_frame = unit(0.8, "mm"),
draw = TRUE)
Arguments
chain1 |
Numeric vector or a matrix with two columns. |
chain2 |
Numeric vector of same length as |
xlim |
x axis limits of both chains (numeric vector of length 2). |
ylim1 |
y axis limits of chain 1 (numeric vector of length 2). |
ylim2 |
y axis limits of chain 2 (numeric vector of length 2). |
chain1_lab |
Label of chain 1 (character of length 1). |
chain2_lab |
Label of chain 2 (character of length 1). |
main |
Title (character of length 1). |
chain1_yaxis_at |
Points at which tick-marks are drawn for chain 1. |
chain2_yaxis_at |
Points at which tick-marks are drawn for chain 2. |
log |
Logical, should the date be log transformed? |
cex_points |
Size of points in scatter plot. |
cex_main |
Size of the title font. |
lwd_lines |
Line width of trace plots. |
lwd_frame |
Line width of frames. |
draw |
Logical, should the returned grob object be drawn? |
Details
The figure is optimized for a plot of the format x11(width = 10, height = 3).
Value
A grob object.
Author(s)
Florian Gerber <florian.gerber@math.uzh.ch>
See Also
grid_zoom
Examples
grid_trace2(runif(500), runif(500),
chain1_yaxis_at = seq(.2, 1, by = .2),
chain1_lab = "chain1", chain2_lab = "chain2",
main = "Uniform",
lwd_lines = grid::unit(.5, "mm"))