Skip to contents

Overview

The package’s own page: what it fits, and a table pointing from the task at hand to the function that does it.

bartisan-package
bartisan: Generalized Bayesian Additive Regression Trees

Fitting a Model

bartisan() is the entry point and bcf() is its counterpart for a treatment effect. Everything else in this section changes what either one fits: the likelihood, the settings the sampler runs under, and the one term that gives a predictor a coefficient of its own.

bartisan()
Fit a generalized Bayesian additive regression trees (BART) model
negbin() ordinal() multinomial() dpm_aft() dpm() weibull_aft() loglogistic_aft() lognormal_aft() ph() gaussian_ls() Gamma_ls() zi_poisson() zi_negbin() Beta() ordbeta() tweedie()
Response families for generalized BART
custom_family()
Fit a model to a likelihood written in R
bartisan_control()
Sampler and prior settings for bartisan()
bcf()
Bayesian causal forests
vc()
Give a predictor a varying coefficient

Predictions and Effects

What the fitted model says about units, real or counterfactual. Every quantity here is computed from the posterior draws, so the summaries carry credible intervals rather than standard errors, and predict() hands back the draws themselves. Calling plot() on a fit draws a partial dependence plot, and that method is documented on the last page in this section.

Describing a Fitted Model

A forest has no coefficient table, so what takes its place is the printed summary, how the splitting rules were spent, and what the parts of the model that do have parameters were drawn to be. The last page holds the print and plot methods a bcf() fit adds on top of these.

print(<bartisan_fit>) summary(<bartisan_fit>) print(<summary.bartisan_fit>)
Summarize a generalized BART model
variable_importance() plot(<bartisan_importance>)
How often each predictor is used
coef(<bartisan_fit>)
Varying coefficients
ranef(<bartisan_fit>)
Group intercepts from a random-effect term
error_density() plot(<bartisan_error_density>)
Error distribution of a Dirichlet process mixture fit
print(<bcf_fit>) plot(<bcf_fit>)
Methods for Bayesian causal forest fits

Checking Convergence and Fit

Whether the sampler explored the posterior, and whether the model describes the data, which are worth settling before anything above is read off a fit. The second page collects the methods that rstantools, loo, bayesplot, posterior and performance call on a fit, along with the stats methods that report the same quantities, so posterior predictive draws, cross-validation, the prior the fit was given, and the fit statistics are all on it.

Data

The observational study the examples and most of the vignettes are fitted to.

rhc
Right heart catheterization in critically ill patients