Skip to content

ebal

Entropy Reweighting to Create Balanced Samples

v0.2.1 · Apr 29, 2026 · GPL (>= 2)

Description

Implements entropy balancing, a data preprocessing procedure described in Hainmueller (2012, <doi:10.1093/pan/mpr025>) that allows users to reweight a dataset such that the covariate distributions in the reweighted data satisfy a set of user-specified moment conditions. Useful for creating balanced samples in observational studies with a binary treatment where the control group is reweighted to match the covariate moments of the treatment group, and for reweighting a survey sample to known characteristics from a target population.

Downloads

CRAN

3.9K

Last 30 days

1885th

14.5K

Last 90 days

50.7K

Last year

Trend: -38% (30d vs prior 30d)

r2u CRAN

11

Last 30 days

90

Last 90 days

354

Last year

Trend: -71.1% (30d vs prior 30d)

autoCRAN

0

Last 7 days

13

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 6, 2026
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Jens Hainmueller <jhain@stanford.edu>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Jens",
                    family = "Hainmueller",
                    role = c("aut", "cre"),
                    email = "jhain@stanford.edu")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Jens Hainmueller <jhain@stanford.edu>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Jens",
                    family = "Hainmueller",
                    role = c("aut", "cre"),
                    email = "jhain@stanford.edu")
as necessary.

Code

Structure

Lines of code

1,592

Files

31

Compiled share

0%

Has compiled src

No

Language breakdown

R 693 (43.5%)Tests 265 (16.6%)Docs 634 (39.8%)

API

Exported functions

7

Internal functions

13

Testing & CI

Has tests

Yes

Test-to-code ratio

0.38

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

100%

Unsafe pattern score

0

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

GPL (>= 2)

License flags

SPDX valid, OSI approved

History

Versions

8

First release

2011-07-27

Latest release

2026-04-29

Avg cadence

185 days

Cold removal rate

Dep drift

3

LOC over versions

v0.1-1: 830 LOCv0.1-2: 830 LOCv0.1-3: 830 LOCv0.1-4: 841 LOCv0.1-5: 842 LOCv0.1-6: 825 LOCv0.1-8: 825 LOCv0.2.1: 1,592 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (6)

imports

suggests

Dependency Network

Dependencies Reverse dependencies fdid jointCalib cobalt hbal missDiag rbw ebal

Version History

9 tracked
updated 0.2.1 ← 0.1-8 diff Apr 29, 2026
new 0.1-8 Mar 10, 2026
updated 0.1-8 ← 0.1-6 diff Jun 8, 2022
updated 0.1-6 ← 0.1-5 diff Jan 26, 2014
updated 0.1-5 ← 0.1-4 diff Oct 15, 2013
updated 0.1-4 ← 0.1-3 diff Aug 11, 2013
updated 0.1-3 ← 0.1-2 diff Feb 8, 2013
updated 0.1-2 ← 0.1-1 diff Dec 26, 2011
new 0.1-1 Jul 26, 2011