plotQuant {scapeMCMC}R Documentation

Plot MCMC Quantiles

Description

Plot quantiles of multiple Markov-chain Monte Carlo chains, using bars, boxes, or lines.

Usage

plotQuant(mcmc, style="boxes", probs=c(0.025,0.975), axes=TRUE,
names=NULL, ylim=NULL, yaxs="i", div=1, log=FALSE, base=10, main=NULL,
xlab=NULL, ylab=NULL, cex.axis=0.8, las=1, tck=-0.015, tick.number=8,
lty.median=1, lwd.median=1+2*(style!="boxes"), col.median="black",
lty.outer=1+2*(style=="lines"), lwd.outer=1, col.outer="darkgrey",
boxfill="darkgrey", boxwex=0.7, mai=c(0.8,1,1,0.6),
mgp=list(bottom=c(2,0.4,0),left=c(3,0.6,0),top=c(0,0.6,0),
right=c(0,0.6,0)), ...)

Arguments

mcmc MCMC chains as a data frame or mcmc object.
style how quantiles should be drawn: "bars", "boxes", or "lines".
probs outer quantiles to draw, a vector of length 2.
axes numeric vector indicating which axis labels should be drawn: 1=bottom, 2=left, 3=top, 4=right, or TRUE to display all (default).
names x-axis labels.
ylim y-axis limits.
yaxs y-axis style: "i" to truncate exactly at limits (default) or "r" to extend the axis slightly beyond the limits.
div denominator to shorten values on the y axis.
log whether values should be log-transformed.
base logarithm base.
main main title.
xlab x-axis label.
ylab y-axis label.
cex.axis size of tick labels.
las orientation of tick labels: 0=parallel, 1=horizontal, 2=perpendicular, 3=vertical.
tck tick mark length.
tick.number number of tick marks.
lty.median line type of median.
lwd.median line width of median.
col.median colour of median.
lty.outer line type of outer quantiles.
lwd.outer line width of outer quantiles.
col.outer colour of outer quantiles.
boxfill colour of boxes.
boxwex relative width of boxes.
mai margins around plot as a vector of four numbers (bottom, left, top, right).
mgp margins around axis titles, labels, and lines as a list of four vectors (bottom, left, top, right).
... passed to plot, bxp, plotCI, lines, matplot, axis, and title.

Value

List containing:

x midpoint coordinates on the x axis.
y quantile coordinates on the y axis.

Note

The Args function from the gdata package is recommended for reviewing the arguments, instead of args.

Author(s)

Arni Magnusson arnima@u.washington.edu.

See Also

bxp, plotCI, matplot, quantile.

scapeMCMC-package gives an overview of the package.

Examples

plotQuant(xmcmc$B, style="lines", div=1000, xlab="Year",
          ylab="Biomass age 4+ (1000 t)")
plotQuant(xmcmc$R, names=substring(names(xmcmc$R),3), div=1000,
          xlab="Year", ylab="Recruitment (million one-year-olds)")

[Package scapeMCMC version 1.0-3 Index]