Skip to contents

The Bayesian regression approach to a sum of complementary trees is to shrink the said fit of each tree through a regularization prior. BART models provide non-linear highly flexible estimation and have been shown to compare favourable among machine learning algorithms (Dorie et al. 2019). Default prior preference is for trees to be small (few terminal nodes) and shrinkage towards 0.

This package requires the "dbarts" R-package to be installed. Many of the functionalities of this engine have been inspired by the "embarcadero" R-package. Users are therefore advised to cite if they make heavy use of BART.


engine_bart(x, iter = 1000, nburn = 250, chains = 4, type = "response", ...)



distribution() (i.e. BiodiversityDistribution) object.


A numeric estimate of the number of trees to be used in the sum-of-trees formulation (Default: 1000).


A numeric estimate of the burn in samples (Default: 250).


A number of the number of chains to be used (Default: 4).


The mode used for creating posterior predictions. Either "link" or "response" (Default: "response").


Other options.


An Engine.


Prior distributions can furthermore be set for:

  • probability that a tree stops at a node of a given depth (Not yet implemented)

  • probability that a given variable is chosen for a splitting rule

  • probability of splitting that variable at a particular value (Not yet implemented)


  • Carlson, CJ. embarcadero: Species distribution modelling with Bayesian additive regression trees in r. Methods Ecol Evol. 2020; 11: 850– 858.

  • Dorie, V., Hill, J., Shalit, U., Scott, M., & Cervone, D. (2019). Automated versus do-it-yourself methods for causal inference: Lessons learned from a data analysis competition. Statistical Science, 34(1), 43-68.

  • Vincent Dorie (2020). dbarts: Discrete Bayesian Additive Regression Trees Sampler. R package version 0.9-19.


if (FALSE) {
# Add BART as an engine
x <- distribution(background) |> engine_bart(iter = 100)