Generates a plot of representing results from
compare.samplers
.
comparison.plot(RS, xlab=NULL, ylab=NULL, base_size=10, ...)
A ggplot2 plot object.
A data frame in the form returned by
compare.samplers
and simulation.result
.
Options to be passed to
ggplot2::qplot
.
The text base size passed to
ggplot2::theme_bw
.
This function generates a grid of subplots, where each column of
plots represents a sampler and each row represents a distribution.
The horizontal axis in each subplot represents the tuning parameter
passed as tuning
to compare.samplers
, and
the vertical axis represents the product RS$evals * RS$act
,
the number of log density evaluations per independent sample
required for that distribution when simulated by that sampler
with that tuning parameter. 95% confidence intervals, covering
the range [RS$evals * RS$act.025, RS$evals * RS$act.975]
,
are represented by vertical bars. If RS$evals
or RS$act
is missing or infinite, a question mark is plotted instead of the
default plot character.
comparison.plot
returns a ggplot2 plot object. If it
is called non-interactively, one must call print
on the returned object for a plot to be displayed. To superimpose
other figures of merit on the plot, one can add geom_*
objects to the returned plot object before calling print
.
For more discussion of this type of plot, see Thompson (2010).
Thompson, M. B. (2010), Graphical comparison of MCMC performance, University of Toronto Dept. of Statistics technical report no. 1010.
Thompson, M. B. (2011), “Introduction to SamplerCompare,” Journal of Statistical Software 43(12):1-10, tools:::Rd_expr_doi("10.18637/jss.v043.i12").
compare.samplers
,
simulation.result
,
ggplot2::qplot
,
“Introduction to SamplerCompare” (vignette)