Learn R Programming

ShrinkageTrees

Overview

ShrinkageTrees provides a unified framework for survival analysis using Bayesian regression tree ensembles, with a particular focus on causal inference and high-dimensional data.

The package implements Horseshoe Trees, Causal Horseshoe Forests, and their more general counterparts — Shrinkage Trees and Causal Shrinkage Forests — alongside well-known Bayesian tree models such as BART, DART, and BCF. All models are adapted to right-censored data via accelerated failure time (AFT) formulations.

Its central methodological innovation is the Horseshoe regularisation mechanism applied directly to tree step heights, enabling adaptive global–local shrinkage in high-dimensional settings. In addition to classical BART priors, the package supports:

  • Horseshoe priors
  • Forest-wide Horseshoe shrinkage
  • Empirical Bayes Horseshoe calibration
  • Half-Cauchy priors
  • Dirichlet splitting priors (DART)

These models enable flexible non-linear modelling for:

  1. High-dimensional prediction
  2. High-dimensional causal inference
  3. Estimation of heterogeneous (conditional average) treatment effects (CATE)

Supported outcome types:

  • Continuous outcomes
  • Binary outcomes
  • Right-censored survival times (AFT framework)

All models are implemented with an efficient C++ backend via Rcpp, allowing scalable MCMC sampling in high-dimensional settings.

⭐ Core Contribution: Horseshoe Trees

Traditional BART and DART primarily regularise model complexity through the **tree structure (e.g., depth constraints or splitting probabilities).

ShrinkageTrees instead introduces global–local shrinkage directly on the leaf (step height) parameters via the Horseshoe prior.

A global parameter controls overall shrinkage, while local parameters allow strong signals to escape shrinkage. Small effects are aggressively shrunk toward zero, whereas large effects are preserved due to the heavy-tailed prior.

This strategy retains all covariates, reduces noise in high-dimensional settings, and improves robustness in causal models.

This methodology is introduced in:

Horseshoe Forests for High-Dimensional Causal Survival Analysis
T. Jacobs, W.N. van Wieringen, S.L. van der Pas
https://arxiv.org/abs/2507.22004

Copy Link

Version

Install

install.packages('ShrinkageTrees')

Monthly Downloads

413

Version

1.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Tijn Jacobs

Last Published

February 26th, 2026

Functions in ShrinkageTrees (1.2.0)

SurvivalDART

SurvivalDART
SurvivalShrinkageBCF

SurvivalShrinkageBCF (Shrinkage Bayesian Causal Forest for survival data)
pdac

Processed TCGA PAAD dataset (pdac)
censored_info

Compute mean estimate for censored data
SurvivalBART

SurvivalBART
SurvivalBCF

SurvivalBCF (Bayesian Causal Forest for survival data)
HorseTrees

Horseshoe Regression Trees (HorseTrees)
CausalShrinkageForest

General Causal Shrinkage Forests
ShrinkageTrees

General Shrinkage Regression Trees (ShrinkageTrees)
CausalHorseForest

Causal Horseshoe Forests