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-x86_64)forestBalance_0.1.1.zip(r-4.7-arm64)forestBalance_0.1.1.zip(r-4.6-x86_64)forestBalance_0.1.1.zip(r-4.6-arm64)forestBalance_0.1.1.zip(r-4.5-x86_64)
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 |NEWS
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.29 score 14 scripts 331 downloads 8 exports 10 dependencies

Last updated from:791dee01ce. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK127
linux-devel-x86_64OK170
source / vignettesOK199
linux-release-arm64OK129
linux-release-x86_64OK143
macos-release-arm64OK133
macos-release-x86_64OK388
macos-oldrel-arm64OK147
macos-oldrel-x86_64OK308
windows-devel-arm64OK261
windows-devel-x86_64OK166
windows-release-arm64OK216
windows-release-x86_64OK122
windows-oldrel-x86_64OK137
wasm-releaseOK105

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-11-09
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-11-09
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-11-09
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 | Solver comparison | End-to-end timing | Scaling with number of trees | Pipeline stage breakdown | Memory usage | Summary

Last update: 2026-11-09
Started: 2026-03-19