Skip to contents

Overview

dbarts-package
Discrete Bayesian Additive Regression Trees Sampler

Model fitting

Fit BART models to fixed data.

The mutable sampler

Create and drive a sampler whose predictors, response, offset, and weights can change between draws, for use inside larger MCMC schemes.

dbarts()
Discrete Bayesian Additive Regression Trees Sampler
run(<dbartsSampler>) sampleTreesFromPrior(<dbartsSampler>) sampleLeafParametersFromPrior(<dbartsSampler>) sampleVarianceForestFromPrior(<dbartsSampler>) growFromRoot(<dbartsSampler>) copy(<dbartsSampler>) show(<dbartsSampler>) predict(<dbartsSampler>) predictForests(<dbartsSampler>) setControl(<dbartsSampler>) setModel(<dbartsSampler>) setData(<dbartsSampler>) setResponse(<dbartsSampler>) setOffset(<dbartsSampler>) setWeights(<dbartsSampler>) setCategoryOffset(<dbartsSampler>) setCategoryTestOffset(<dbartsSampler>) setActiveRows(<dbartsSampler>) setForestWeights(<dbartsSampler>) setForestBasis(<dbartsSampler>) setSigma(<dbartsSampler>) setPredictor(<dbartsSampler>) setCutPoints(<dbartsSampler>) setTestPredictor(<dbartsSampler>) setTestPredictorAndOffset(<dbartsSampler>) setTestOffset(<dbartsSampler>) printTrees(<dbartsSampler>) getTrees(<dbartsSampler>) getSigmas(<dbartsSampler>) getShape(<dbartsSampler>) getLatents(<dbartsSampler>) getSumsOfSquaredResiduals(<dbartsSampler>) getFitsWithoutOffset(<dbartsSampler>) getVariance(<dbartsSampler>) getForestFits(<dbartsSampler>) getForestAmplitudes(<dbartsSampler>) getForestVariableCounts(<dbartsSampler>) getLeafPrior(<dbartsSampler>) getK(<dbartsSampler>) setLeafPrior(<dbartsSampler>) getForest(<dbartsSampler>) setForest(<dbartsSampler>) setTreePrior(<dbartsSampler>) getVarianceForest(<dbartsSampler>) setVarianceForest(<dbartsSampler>) installTrees(<dbartsSampler>) sampleNodeParametersFromPrior(<dbartsSampler>) startThreads(<dbartsSampler>) stopThreads(<dbartsSampler>) storeState(<dbartsSampler>) setState(<dbartsSampler>) plotTree(<dbartsSampler>)
Class "dbartsSampler" of Discrete Bayesian Additive Regression Trees Sampler
dbartsControl()
Discrete Bayesian Additive Regression Trees Sampler Control
dbartsData()
Discrete Bayesian Additive Regression Trees Sampler Data
model.frame(<dbartsData>) nobs(<dbartsData>)
The Data of a dbartsData Object
dbartsSpec()
Discrete Bayesian Additive Regression Trees Sampler Specification
dbartsPriors
Prior Specification Constructors
show(<dbartsFamily>)
Response Family Constructors
dbartsForests
Forest Specification Constructors
interactions()
Interaction Constraints for BART
blocks()
Block-Additive Constraints for BART
monotone()
Monotone Constraints for BART
forest()
Forest Specification for Multi-Forest Models
varianceForest()
Variance Forest Specification for Heteroscedastic BART
dbartsDrawLatents() dbartsWorkingResponse()
Augmentation Draws For A Composed Sampler
extract(<dbartsSampler>)
Extract the Predictor Matrix From a Sampler
samplePriorPredictive()
Draw From The BART Prior
sparseFactor()
Sparse Unordered Factors
updatePredictorPerObservationJointly()
Jointly Update a Shared Predictor per Observation Across Samplers

Survival

Accelerated failure time survival curves.

survivalProbabilities()
Survival Probability Draws from a Survival Fit

Diagnostics

Convergence summaries, and calibration of a sampler composed around one.

summary(<bart>) print(<summary.bart>)
Convergence Diagnostics for BART Fits
rhat()
R-hat of One Quantity's Draws
dbartsValidateComposition()
Validate A Composed Sampler By Simulation-Based Calibration

Deprecated

Names kept reachable for one release past their removal or rename.

dbarts-deprecated bart2
Deprecated and Removed Functions in dbarts
rbart_vi() plot(<rbart>) fitted(<rbart>) extract(<rbart>) predict(<rbart>) residuals(<rbart>) print(<rbart>) sigma(<rbart>) nobs(<rbart>)
Bayesian Additive Regression Trees with Random Effects

Utilities

dbarts-embedding
Embedding dbarts In A Larger Sampler
na.keepPredictors()
Drop Rows With A Missing Response, Keep Missing Predictors
plotTree()
Plot a Single Tree From a Fitted BART Model
makeModelMatrixFromDataFrame() makeind() makeTestModelMatrix()
Make Model Matrix from Data Frame
dim(<dbartsMixedMatrix>) dimnames(<dbartsMixedMatrix>) `[`(<dbartsMixedMatrix>) as.matrix(<dbartsMixedMatrix>) as.data.frame(<dbartsMixedMatrix>)
Mixed Dense/Sparse Predictor Container
guessNumCores()
Guess Number of Cores