Skip to content

CBPS

0.24

Covariate Balancing Propensity Score

8packages depend
69.6Kdownloads / year
18.0%test coverage
13/13checks pass

Overview

About
Maintained by Christian FongFirst published 2012-07-1924 releasesCRAN page ↗

Implements the covariate balancing propensity score (CBPS) proposed by Imai and Ratkovic (2014) DOI:10.1111/rssb.12027. The propensity score is estimated such that it maximizes the resulting covariate balance as well as the prediction of treatment assignment. The method, therefore, avoids an iteration between model fitting and balance checking. The package also implements optimal CBPS from Fan et al. (in-press) DOI:10.1080/07350015.2021.2002159, several extensions of the CBPS beyond the cross-sectional, binary treatment setting. They include the CBPS for longitudinal settings so that it can be used in conjunction with marginal structural models from Imai and Ratkovic (2015) DOI:10.1080/01621459.2014.956872, treatments with three- and four-valued treatment variables, continuous-valued treatments from Fong, Hazlett, and Imai (2018) DOI:10.1214/17-AOAS1101, propensity score estimation with a large number of covariates from Ning, Peng, and Imai (2020) DOI:10.1093/biomet/asaa020, and the situation with multiple distinct binary treatments administered simultaneously. In the future it will be extended to other settings including the generalization of experimental and instrumental variable estimates.

Install

Health

CRAN checks
13OK
Slowest check: 3.1 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.02
18.0%
Coverage · measured lines
100%
Documentation · exports
None
Vignettes
No
README
5
Dependencies · direct
Check history
  • OK2026-04-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-09
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Downloads

69.6K
CRAN downloads in the past year
Rank #1,857 · ~191/day · ~5.8K/mo
Daily download trend is not available in this view yet.
4K30 days
15.1K90 days
69.6K1 year
Compare downloads with other packages →
Also on274 r2u33 autocran39 c2d4u

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (6)
R >= 3.4MASSMatchItnnetnumDerivglmnet
Imports (0)
none
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none

Code & Tests

Code Composition
R 5,097 (78%)Rd 1,417 (22%)
Code characteristics
Object systems
S312
Cyclomatic complexity
6.0 median / 31 max
Test cases
2 / 0.02 per code line
Documented parameters
100%

Test coverage

Line coverage

18%

Expression

18.6%

Tests / Examples

18.0% / 33% ex

Functions

32 9 exported

Complexity

9.5 avg / 31 max

Call network

32 nodes / 16 edges

Loading call graph…

Lowest coverage

32 functions
FunctionCycloCoverage
AsyVar exp260%
CBIV exp190%
balance exp10%
hdCBPS exp50%
npCBPS exp50%
vcov_outcome exp10%

People & History

People (7)
Maintainer (1)
Author, Maintainer
Authors (3)
Author, Maintainer
Contributors (4)
Contributor
Contributor
Contributor
Contributor
Release timeline

24 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.24Latest
    2025-12-01 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.23
    2022-01-18 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.22
    2021-03-29 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.21
    2019-08-21 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.20
    2019-03-22 · diff ↗
  • 0.19
    2018-06-17 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.18
    2018-03-10 · diff ↗
Show 23 earlier events
  • 0.17
    2018-01-30 · diff ↗
  • 0.16
    2017-12-19 · diff ↗
  • 0.15
    2017-11-26 · diff ↗
  • 0.14
    2017-10-02 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.13
    2016-12-30 · diff ↗
  • 0.12
    2016-11-01 · diff ↗
  • 0.11
    2016-05-13 · diff ↗
  • R
    R 3.3.0 released · 2016-05-03
  • 0.10
    2015-09-21 · diff ↗
  • R
    R 3.2.0 released · 2015-04-16
  • 0.9
    2014-08-14 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 0.8
    2014-03-08 · diff ↗
  • 0.7
    2013-07-25 · diff ↗
  • 0.6
    2013-06-07 · diff ↗
  • 0.5
    2013-05-08 · diff ↗
  • 0.4
    2013-04-03 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 0.3
    2013-01-31 · diff ↗
  • 0.2
    2012-09-29 · diff ↗
  • 0.1
    2012-07-19
  • R
    R 2.15.0 released · 2012-03-30

Package metadata

First published
2012-07-19
Total releases
24 / 14 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.4
Bundled data
42 KB / 2 files
Download size
108 KB
Installed size
not tracked yet
With dependencies
not tracked yet