Functions to plot summary information about the sampled inverse temperatures, tree heights, etc., stored in the traces of a "tgp"-class object

Share:

Description

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

Usage

1
2
3
itemps.barplot(obj, main = NULL, xlab = "itemps", 
               ylab = "counts", plot.it = TRUE, ...)
hist2bar(x)

Arguments

obj

"tgp"-class object

main

Main plot label to be augmented by itemps.barplot

xlab

Label for the x-axis

ylab

Label for the y-axis

plot.it

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

x

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

Details

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

Value

Both functions return a data.frame that can be used within the barplot function with argument beside=TRUE

Author(s)

Robert B. Gramacy, rbgramacy@chicagobooth.edu, and Matt Taddy, taddy@chicagobooth.edu

References

Gramacy, R.B., Samworth, R.J., and King, R. (2007) Importance Tempering. ArXiv article 0707.4242 http://arxiv.org/abs/0707.4242

http://bobby.gramacy.com/r_packages/tgp

See Also

default.itemps, vignette(tgp2), barplot