pdsoftbart | R Documentation |
Modified version of the pdbart
function from the BayesTree
package; largely supplanted by the softbart_regression
and
partial_dependence_regression
functions. Runs softbart
at test
observations constructed so that a plot can be created displaying the effect
of a single variable or pair of variables.
pdsoftbart(
X,
Y,
xind = NULL,
levs = NULL,
levquants = c(0.05, (1:9)/10, 0.95),
pl = FALSE,
plquants = c(0.05, 0.95),
...
)
X |
Training data covariates. |
Y |
Training data response. |
xind |
Variables to create the partial dependence plots for. |
levs |
List of levels of the covariates to evaluate at. |
levquants |
Used if |
pl |
Create a plot? |
plquants |
Quantiles for the partial dependence plot. |
... |
Additional arguments passed to softbart or plot. |
Returns a list with components given below.
fd
: A matrix whose (i,j)
th value is the i
th draw of the partial dependence function for the
j
th level.
levs
: The list of levels used, each component corresponding to a
variable. If the argument levs
was supplied it is unchanged. Otherwise, the
levels in levs are constructed using the argument levquants
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.