Package: balancing 0.0.0.9000

Malcolm Barrett

balancing: Optimization-Based Balancing Weights for Causal Inference

Calculates optimization-based balancing weights for causal inference, including entropy balancing, inverse probability tilting, the covariate balancing propensity score, energy balancing, characteristic function distance balancing, and stable balancing weights. Weights target covariate balance directly by solving a convex optimization problem, with support for binary, categorical, and continuous exposures across a range of causal estimands. A Rust core provides the numerical solvers.

Authors:Malcolm Barrett [aut, cre, cph], The authors of the vendored Rust crates [cph]

balancing_0.0.0.9000.tar.gz
balancing_0.0.0.9000.zip(r-4.7-x86_64)balancing_0.0.0.9000.zip(r-4.7-arm64)balancing_0.0.0.9000.zip(r-4.6-x86_64)balancing_0.0.0.9000.zip(r-4.6-arm64)balancing_0.0.0.9000.zip(r-4.5-x86_64)
balancing_0.0.0.9000.tgz(r-4.6-x86_64)balancing_0.0.0.9000.tgz(r-4.6-arm64)balancing_0.0.0.9000.tgz(r-4.5-x86_64)balancing_0.0.0.9000.tgz(r-4.5-arm64)
balancing_0.0.0.9000.tar.gz(r-4.7-arm64)balancing_0.0.0.9000.tar.gz(r-4.7-x86_64)balancing_0.0.0.9000.tar.gz(r-4.6-arm64)balancing_0.0.0.9000.tar.gz(r-4.6-x86_64)
balancing_0.0.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
balancing/json (API)

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

Bug tracker:https://github.com/r-causal/balancing/issues

Pkgdown/docs site:https://r-causal.github.io

On CRAN:

Conda:

rustcargo

4.91 score 3 stars 20 scripts 31 exports 12 dependencies

Last updated from:1b40fcb277. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK344
linux-devel-x86_64OK377
source / vignettesOK376
linux-release-arm64OK301
linux-release-x86_64OK256
macos-release-arm64OK438
macos-release-x86_64OK782
macos-oldrel-arm64OK436
macos-oldrel-x86_64OK722
windows-devel-arm64OK916
windows-devel-x86_64OK398
windows-release-arm64OK718
windows-release-x86_64OK453
windows-oldrel-x86_64OK437
wasm-releaseOK264

Exports:as_bwas_conditionalas_marginalbalancebalance_methodbalance_termsbalancingbalancing_estimating_equationsbuild_constraint_matrixbwbw_cbpsbw_cfdbw_energybw_entropybw_iptbw_sbwestimandestimating_equation_methodestimating_equationsfit_methodipwis_bwis_causal_wtmethod_labelnew_bwpool_ipwquadratic_program_methodrebuild_constraint_matrixsupported_estimandssupported_exposure_typessupports_estimating_equations

Dependencies:causalgenericsclideligenericsgluelifecyclerlangrootSolveS7tidyselectvctrswithr

Choosing a balancing method
Two families of methods | Which exposures and estimands each method supports | Exact versus tolerance-based balance | Constraints in depth | Continuous exposures | A note on solvers

Last update: 2026-08-31
Started: 2026-07-14

Inference after balancing
Why the weights' uncertainty matters | M-estimation with ipw() | Categorical exposures | Effect modification with .by | Joint exposures | Continuous exposures | Covariate-adjusted outcome models | Bootstrapping the other fits | Choosing an approach

Last update: 2026-08-31
Started: 2026-07-14

Get started with balancing
A confounded example | Fitting balancing weights | Checking balance with halfmoon | Estimating a causal effect | Standard errors with ipw() | Where to go next

Last update: 2026-08-02
Started: 2026-07-14