Package: forestBalance 0.1.1

forestBalance: Balancing Confounder Distributions with Forest Energy Balancing

Estimates average treatment effects using kernel energy balancing with random forest similarity kernels. A multivariate random forest jointly models covariates, outcome, and treatment to build a similarity kernel between observations. This kernel is then used for energy balancing to create weights that control for confounding. The method is described in De and Huling (2025) <doi:10.48550/arXiv.2512.18069>.

Authors:Jared Huling [aut, cre], Simion De [aut]

forestBalance_0.1.1.tar.gz
forestBalance_0.1.1.zip(r-4.7)forestBalance_0.1.1.zip(r-4.6)forestBalance_0.1.1.zip(r-4.5)
forestBalance_0.1.1.tgz(r-4.6-x86_64)forestBalance_0.1.1.tgz(r-4.6-arm64)forestBalance_0.1.1.tgz(r-4.5-x86_64)forestBalance_0.1.1.tgz(r-4.5-arm64)
forestBalance_0.1.1.tar.gz(r-4.7-arm64)forestBalance_0.1.1.tar.gz(r-4.7-x86_64)forestBalance_0.1.1.tar.gz(r-4.6-arm64)forestBalance_0.1.1.tar.gz(r-4.6-x86_64)
forestBalance_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
forestBalance/json (API)

# Install 'forestBalance' in R:
install.packages('forestBalance', repos = c('https://jaredhuling.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jaredhuling/forestbalance/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

5.05 score 14 scripts 442 downloads 8 exports 10 dependencies

Last updated from:057d235b84. Checks:11 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64WARNING152
linux-devel-x86_64WARNING155
source / vignettesOK231
linux-release-arm64WARNING171
linux-release-x86_64WARNING135
macos-release-arm64WARNING100
macos-release-x86_64WARNING236
macos-oldrel-arm64WARNING115
macos-oldrel-x86_64WARNING194
windows-develWARNING135
windows-releaseWARNING143
windows-oldrelWARNING139
wasm-releaseOK124

Exports:compute_balanceforest_balanceforest_kernelget_leaf_node_matrixkernel_balanceleaf_node_kernelleaf_node_kernel_Zsimulate_data

Dependencies:DiceKriginggrflatticelmtestMASSMatrixRcppRcppEigensandwichzoo

Augmented (Doubly-Robust) Estimation
Overview | $$\hat\tau_ | Basic usage | How it works with cross-fitting | Simulation comparison | User-supplied outcome predictions | When to use augmentation | References

Last update: 2026-03-27
Started: 2026-03-20

Cross-Fitting for Debiased Kernel Estimation
The overfitting problem | Cross-fitting details | K-fold cross-fitting | The role of leaf size | Practical usage | Choosing the number of folds | References

Last update: 2026-03-27
Started: 2026-03-20

Getting Started with forestBalance
Overview | Setup | Simulating data | Estimating the ATE | Forest balance | Entropy balancing (WeightIt) | Energy balancing (WeightIt) | Comparison | Covariate balance | Simulation study | Step-by-step interface

Last update: 2026-03-27
Started: 2026-03-19

Performance and Scalability
Overview | Mathematical background | The kernel energy balancing system | The kernel factorization | Direct solver (block Cholesky) | CG solver (matrix-free) | Block Jacobi preconditioned CG (default for large $n$) | Solver comparison | End-to-end timing | Scaling with number of trees | Pipeline stage breakdown | Memory usage | Summary

Last update: 2026-03-27
Started: 2026-03-19