Skip to content

stochtree

0.4.5

Stochastic Tree Ensembles (XBART and BART) for Supervised Learning and Causal Inference

1packages depend
7.3Kdownloads / year
64.3%test coverage
13/13checks pass

Overview

About
Maintained by Drew HerrenFirst published 2025-02-0710 releasesCRAN page ↗GitHub ↗

Flexible stochastic tree ensemble software. Robust implementations of Bayesian Additive Regression Trees (BART) (Chipman, George, McCulloch (2010) doi:10.1214/09-AOAS285) for supervised learning and Bayesian Causal Forests (BCF) (Hahn, Murray, Carvalho (2020) doi:10.1214/19-BA1195) for causal inference. Enables model serialization and parallel sampling and provides a low-level interface for custom stochastic forest samplers. Includes the grow-from-root algorithm for accelerated forest sampling (He and Hahn (2021) doi:10.1080/01621459.2021.1942012), a log-linear leaf model for forest-based heteroskedasticity (Murray (2020) doi:10.1080/01621459.2020.1813587), and the cloglog BART model of Alam and Linero (2025) doi:10.48550/arXiv.2502.00606 for ordinal outcomes.

Install

Health

CRAN checks
13OK
Slowest check: 8.4 min · r-devel-windows-x86_64
Code health
Yes
Tests · ratio 0.45
64.3%
Coverage · measured lines
100%
Documentation · exports
2
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-03-10
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 40 wordsVignettesNopkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
0%

Downloads

7.3K
CRAN downloads in the past year
Rank #4,505 · ~20/day · ~610/mo
Daily download trend is not available in this view yet.
45430 days
1.7K90 days
7.3K1 year
Compare downloads with other packages →
Also on530 r2u25 autocran

Repository

Repository
77Stars
18Forks
18Open issues
7Open PRs
16Releases
1,403Commits
8Contributors
decision-treesmachine-learningtree-ensemblesbartbayesian-methodsprobabilistic-modelsbayesian-machine-learninggradient-boosted-trees
1,403 commits · Last activity 2026-07-30 · 0% stars, 30d

Stars over time

2025-07-29 · 492026-07-18 · 77

Repository practices

Upstream repositoryBeta

7 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/stochastictree/stochtree on 2026-08-16.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
Dev Container
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
Air
Show all practices
Governance and community (1)
Issue templates
Git structural (2)
.gitattributesSubmodules
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (0)
none
Imports (2)
R6stats
LinkingTo (2)
Suggests (1)
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

People & History

People (15)
Maintainer (1)
Author, Maintainer
Authors (5)
Author, Maintainer
Author
Contributors (2)
Contributor · added in 0.4.0
Contributor
Copyright holders (8)
Copyright holder
Copyright holder
Copyright holder
Copyright holder
Copyright holder
Copyright holder
Copyright holder
Copyright holder
Package Timeline

10 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 0.4.5Latest
    2026-06-30 · current release · diff ↗
  • 0.4.4
    2026-06-09 · diff ↗
  • 0.4.2
    2026-04-29 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.4.0
    2026-03-06 · diff ↗
  • 0.3.1
    2026-02-12 · diff ↗
  • 0.3.0
    2026-01-28 · diff ↗
  • 0.2.1
    2025-12-11 · diff ↗
  • 0.2.0
    2025-11-22 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.1
    2025-02-08 · diff ↗
  • 0.1.0
    2025-02-07
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2025-02-07
Total releases
10 / 1 yrs
License
MIT + file LICENSE OSI
Download size
1.6 MB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("stochtree")
Herren, D., Alam, E., Carvalho, C., Corporation, M., Hahn, R., He, J., Lemire, D., Lima, P., Lohmann, N., Murray, J., Zverovich, V., contributors, E., contributors, s., contributors, t., & contributors, x. (2026). stochtree: Stochastic Tree Ensembles (XBART and BART) for Supervised Learning and Causal Inference (Version 0.4.5) [Computer software]. https://doi.org/10.32614/CRAN.package.stochtree

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for stochtree version 0.4.5 [Data set]. HJJB, LLC. Data release v2026-08-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy