Plotting predictive distributions constructed from dynamic tree (regression) models for 1-d data -- provided primarily for use in our 1-d examples and for illustrative purposes
# S3 method for dynaTree
plot(x, proj = 1, add = FALSE, ylim = NULL,
col = 2, lwd = 1, ptype = c("each", "mean"), ...)
The only output of this function is a pretty plot
a "dynaTree"
-class object built by dynaTree
a scalar logical
indicating if the lines/points should
be “added” to an existing plot
when ncol(x$X) > 1
this argument can be used to plot
a 1-d projection by specifying which column of x$X
should be used to make the plot
user-specified y-axis limits values; see plot
user-specified color value; see plot
user-specified line-width value; see plot
type of plot used to visualize several predictive
samples obtained from dynaTrees
: "each"
shows each surface with its own set of three lines, and
"mean"
shows the three lines obtained by averaging
other arguments to the generic plot
method
Robert B. Gramacy rbg@vt.edu,
Matt Taddy and Christoforos Anagnostopoulos
This plotting function only handles the predictive output from
1-dimensional regression dynaTree
models as obtained by
first calling dynaTree
and then
predict.dynaTree
on the resulting output at new
XX
locations. It is provided to help make the illustration
of our 1-d examples easier and to serve as an aid in a user's
development of custom plotting functions in higher dimensions
Taddy, M.A., Gramacy, R.B., and Polson, N. (2011). “Dynamic trees for learning and design” Journal of the American Statistical Association, 106(493), pp. 109-123; arXiv:0912.1586
predict.dynaTree
, dynaTree
,
update.dynaTree
## see dynaTree, dynaTrees and update.dynaTree for examples
## which use this plot function
Run the code above in your browser using DataLab