pdsoftbart {SoftBart}R Documentation

Partial dependence plots for SoftBart

Description

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.

Usage

pdsoftbart(
  X,
  Y,
  xind = NULL,
  levs = NULL,
  levquants = c(0.05, (1:9)/10, 0.95),
  pl = FALSE,
  plquants = c(0.05, 0.95),
  ...
)

Arguments

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 levs is not supplied; takes levs to be quantiles of associated predictors.

pl

Create a plot?

plquants

Quantiles for the partial dependence plot.

...

Additional arguments passed to softbart or plot.

Value

Returns a list with components given below.


[Package SoftBart version 1.0.1 Index]