Skip to content

WeightIt

1.7.0

Weighting for Covariate Balance in Observational Studies

23packages depend
122Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Noah GreiferFirst published 2017-10-1733 releasesCRAN page ↗GitHub ↗

Generates balancing weights for causal effect estimation in observational studies with binary, multi-category, or continuous point or longitudinal treatments by easing and extending the functionality of several R packages and providing in-house estimation methods. Available methods include those that rely on parametric modeling, optimization, and machine learning. Also allows for assessment of weights and checking of covariate balance by interfacing directly with the 'cobalt' package. Methods for estimating weighted regression models that take into account uncertainty in the estimation of the weights via M-estimation or bootstrapping are available. See the vignette "Installing Supporting Packages" for instructions on how to install any optional package 'WeightIt' uses, including those that may not be on CRAN.

Install

Health

CRAN checks
13OK
Slowest check: 9.2 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.19
not tracked
Coverage
100%
Documentation · exports
9
Dependencies · direct
Check history
  • OK2026-03-26
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-10
    4 OK · 0 NOTE · 1 WARNING · 9 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 1,053 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
95%
Return-value docs
87%
References docs
49%

Downloads

122K
CRAN downloads in the past year
Rank #1,185 · ~334/day · ~10.2K/mo
Daily download trend is not available in this view yet.
9.3K30 days
31.9K90 days
122K1 year
Compare downloads with other packages →
Also on417 r2u37 autocran4.6K conda_forge84 c2d4u

Repository

Repository
132Stars
22Forks
9Open issues
0Open PRs
0Releases
1,024Commits
4Contributors
causal-inferencepropensity-scoresinverse-probability-weightsobservational-studyr
1,024 commits · Last activity 2026-07-17 · +0.8% stars, 30d

Stars over time

2025-07-21 · 1152026-07-07 · 132

Repository practices

Upstream repositoryBeta

5 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/ngreifer/weightit on 2026-07-19.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
Docs source (1)
README.Rmd
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
31 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

Code Composition
R 25,323 (78%)Rd 5,423 (17%)Vignettes 1,115 (3%)Other 557 (2%)
Code characteristics
Object systems
S368
Cyclomatic complexity
4.0 median / 56 max
Test cases
47 / 0.19 per code line

Test coverage

Line coverage

Expression

Tests / Examples

Functions

272 16 exported

Complexity

9 avg / 56 max

Call network

272 nodes / 1120 edges

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 1
NameClassRows × ColsAlso ships in
msmdatadata.frame7,500 × 10

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Listed in earlier versions (1)
no longer listed · 0.7.0 to 0.7.1
Package Timeline

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

  • R
    R 4.6.0 released · 2026-04-24
  • 1.7.0Latest
    2026-04-22 · current release · diff ↗
  • 1.6.0
    2026-03-19 · diff ↗
  • 1.5.1
    2025-11-15 · diff ↗
  • 1.5.0
    2025-09-18 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.4.0
    2025-02-24 · diff ↗
  • 1.3.2
    2024-11-05 · diff ↗
  • 1.3.1
    2024-10-04 · diff ↗
  • 1.3.0
    2024-08-24 · diff ↗
  • 1.2.0
    2024-07-27 · diff ↗
  • 1.1.0
    2024-05-04 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.0
    2024-03-23 · diff ↗
  • 0.14.2
    2023-05-23 · diff ↗
  • 0.14.1
    2023-05-10 · diff ↗
Show 32 earlier events
  • R
    R 4.3.0 released · 2023-04-21
  • 0.14.0
    2023-04-12 · diff ↗
  • 0.13.1
    2022-06-28 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.12.0
    2021-04-03 · diff ↗
  • 0.11.0
    2021-02-02 · diff ↗
  • 0.10.2
    2020-08-27 · diff ↗
  • 0.10.1
    2020-08-12 · diff ↗
  • 0.10.0
    2020-07-07 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.9.0
    2020-02-11 · diff ↗
  • 0.8.0
    2020-01-12 · diff ↗
  • 0.7.1
    2019-10-30 · diff ↗
  • 0.7.0
    2019-10-16 · diff ↗
  • 0.6.0
    2019-09-05 · diff ↗
  • unarchivedReturned to CRAN
    2019-09-05
  • archivedRemoved from CRAN
    2019-09-03
    uses archived package 'optweight' unconditionally
  • R
    R 3.6.0 released · 2019-04-26
  • 0.5.1
    2019-01-16 · diff ↗
  • 0.5.0
    2018-11-22 · diff ↗
  • 0.4.0
    2018-06-25 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.3.2
    2018-03-14 · diff ↗
  • 0.3.1
    2018-03-03 · diff ↗
  • unarchivedReturned to CRAN
    2018-03-03
  • archivedRemoved from CRAN
    Archived package 'CBPS'
  • archivedRemoved from CRAN
    2018-02-09
    using Suggests packages unconditionally was not corrected despite reminders
  • 0.3.0
    2018-01-14 · diff ↗
  • 0.2.0
    2017-11-13 · diff ↗
  • 0.1.0
    2017-10-17
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-10-17
Total releases
33 / 9 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.1.0
Bundled data
19 KB / 1 file
Download size
1.0 MB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →