Functions for making barplots summarizing the progress of
importance tempering. The itemps.barplot
function can be
used to make a histogram of the inverse temperatures visited
in the trans-temporal Markov chain. The hist2bar
function
is useful for making a histogram of integer-valued samples
(e.g., tree heights) encountered in one or several Markov chains
itemps.barplot(obj, main = NULL, xlab = "itemps",
ylab = "counts", plot.it = TRUE, ...)
hist2bar(x)
Both functions return a data.frame
that can be used
within the barplot
function with argument
beside=TRUE
"tgp"
-class object
Main plot label to be augmented by itemps.barplot
Label for the x-axis
Label for the y-axis
whether to plot the barplot
in addition to returning the data.frame
for later use
in a barplot
call
other arguments passed to barplot
if
plot.it = TRUE
matrix
of integers whose columns are treated as
different realizations of similar processes producing where each
row represents a sample (e.g., tree height) under that process
Robert B. Gramacy, rbg@vt.edu, and Matt Taddy, mataddy@amazon.com
itemps.barplot
specifically works with the $trace
field of a "tgp"
-class object. An error will be produced
if this field is NULL
, i.e., if the b*
function used
the create the object was not run with the argument trace=TRUE
The hist2bar
function can be used on any integer (or discrete)
valued matrix. The columns are interpreted as different realizations
of similar processes for comparison with one another via a histogram.
The histogram is obtained with the barplot
command used
with the argument beside=TRUE
. See the examples section of
default.itemps
Gramacy, R.B., Samworth, R.J., and King, R. (2007) Importance Tempering. ArXiv article 0707.4242 https://arxiv.org/abs/0707.4242
default.itemps
, vignette(tgp2)
,
barplot