This function is intended to be used on the right hand side of the
formula
argument to create_sampler
or
generate_data
. It creates a BART term in the
model's linear predictor. To use this model component one needs
to have R package dbarts installed.
bart(formula, X = NULL, name = "", debug = FALSE, ...)
an object with precomputed quantities and functions for sampling from prior or conditional posterior distributions for this model component. Intended for internal use by other package functions.
a formula specifying the predictors to be used in the BART
model component. Variable names are looked up in the data frame
passed as data
argument to create_sampler
or
generate_data
, or in environment(formula)
.
a design matrix can be specified directly, as an alternative
to the creation of one based on formula
. If X
is
specified formula
is ignored.
the name of the model component. This name is used in the output of the
MCMC simulation function MCMCsim
. By default the name will be 'bart'
with the number of the model term attached.
if TRUE
a breakpoint is set at the beginning of the posterior
draw function associated with this model component. Mainly intended for developers.
parameters passed to dbarts
.
H.A. Chipman, E.I. Georgea and R.E. McCulloch (2010). BART: Bayesian additive regression trees. The Annals of Applied Statistics 4(1), 266-298.