Learn R Programming

atmcmc (version 1.0)

plotmcmc: plots output from `atmcmc'

Description

Produces traceplots and histograms of output from an `atmcmc' run

Usage

plotmcmc(output, name = "MCMC", multimodal = F, plottype = "trace", format = "default", m = 10, phase.start = 1, phase.end = 5, nrow.trace = 3, ncol.trace = 1, nrow.hist = 3, ncol.hist = 3)

Arguments

output
output from an `atmcmc' run
name
name of the project
multimodal
whether to assume target density function is strongly multimodal. Argument takes T or F
plottype
whether to produce traceplots or histograms, or both. Takes argument `trace', `hist', or `all'
format
file format. R graphics, pdf, or png. Takes argument `default', `pdf', or `png'
m
every `m'th iteration is plotted. Has to be a factor of `batchwidth'/2 from the `atmcmc' run
phase.start
first phase to be plotted in traceplots. Takes argument 1, 2, 3, 4, or 5. 1 = 1st adaption phase, 2 = transient phase, 3 = 2nd adaption phase, 4 = 1st half of sampling phase, and 5 = 2nd half of sampling phase
phase.end
last phase to be plotted in traceplots. Takes argument 1, 2, 3, 4, or 5. 1 = 1st adaption phase, 2 = transient phase, 3 = 2nd adaption phase, 4 = 1st half of sampling phase, and 5 = 2nd half of sampling phase
nrow.trace
number of rows for traceplots per page
ncol.trace
number of columns for traceplots per page
nrow.hist
number of rows for histograms per page
ncol.hist
number of columns for histograms per page

Value

Plots including
`name'_histogram
histograms of the sample obtained from the `atmcmc' run
`name'_traceplot
traceplots from the `atmcmc' run. Every `m'th iteration is plotted

Details

Histograms and traceplots are drawn for each coordinate separately. For the sampling phase, traceplots show only one replicative chain (chain that takes the last value of the 2nd adaption phase as the starting value of the sampling phase).

Examples

Run this code
## see examples in `atmcmc'

Run the code above in your browser using DataLab