BARTModel {MachineShop}R Documentation

Bayesian Additive Regression Trees Model

Description

Flexible nonparametric modeling of covariates for continuous, binary, categorical and time-to-event outcomes.

Usage

BARTModel(
  K = integer(),
  sparse = FALSE,
  theta = 0,
  omega = 1,
  a = 0.5,
  b = 1,
  rho = numeric(),
  augment = FALSE,
  xinfo = matrix(NA, 0, 0),
  usequants = FALSE,
  sigest = NA,
  sigdf = 3,
  sigquant = 0.9,
  lambda = NA,
  k = 2,
  power = 2,
  base = 0.95,
  tau.num = numeric(),
  offset = numeric(),
  ntree = integer(),
  numcut = 100,
  ndpost = 1000,
  nskip = integer(),
  keepevery = integer(),
  printevery = 1000
)

Arguments

K

if provided, then coarsen the times of survival responses per the quantiles 1/K, 2/K, ..., K/K to reduce computational burdern.

sparse

logical indicating whether to perform variable selection based on a sparse Dirichlet prior rather than simply uniform; see Linero 2016.

theta, omega

theta and omega parameters; zero means random.

a, b

sparse parameters for Beta(a, b) prior: 0.5 <= a <= 1 where lower values induce more sparsity and typically b = 1.

rho

sparse parameter: typically rho = p where p is the number of covariates under consideration.

augment

whether data augmentation is to be performed in sparse variable selection.

xinfo

optional matrix whose rows are the covariates and columns their cutpoints.

usequants

whether covariate cutpoints are defined by uniform quantiles or generated uniformly.

sigest

normal error variance prior for numeric response variables.

sigdf

degrees of freedom for error variance prior.

sigquant

quantile at which a rough estimate of the error standard deviation is placed.

lambda

scale of the prior error variance.

k

number of standard deviations f(x) is away from +/-3 for categorical response variables.

power, base

power and base parameters for tree prior.

tau.num

numerator in the tau definition, i.e., tau = tau.num / (k * sqrt(ntree)).

offset

override for the default offset of F^-1(mean(y)) in the multivariate response probability P(y[j] = 1 | x) = F(f(x)[j] + offset[j]).

ntree

number of trees in the sum.

numcut

number of possible covariate cutoff values.

ndpost

number of posterior draws returned.

nskip

number of MCMC iterations to be treated as burn in.

keepevery

interval at which to keep posterior draws.

printevery

interval at which to print MCMC progress.

Details

Response types:

factor, numeric, Surv

Default argument values and further model details can be found in the source See Also links below.

Value

MLModel class object.

See Also

gbart, mbart, surv.bart, fit, resample

Examples


## Requires prior installation of suggested package BART to run

fit(sale_amount ~ ., data = ICHomes, model = BARTModel)



[Package MachineShop version 3.7.0 Index]