Skip to content

optweight

2.0.1Package record

Optimization-Based Stable Balancing Weights

0packages dependsuggested by 3
44.1Kdownloads / year
47.4%test coverage
13/13flavors OK

Overview

About

Use optimization to estimate weights that balance covariates for binary, multi-category, continuous, and multivariate treatments in the spirit of Zubizarreta (2015) doi:10.1080/01621459.2015.1023805. The degree of balance can be specified for each covariate. In addition, sampling weights can be estimated that allow a sample to generalize to a population specified with given target moments of covariates, as in matching-adjusted indirect comparison (MAIC).

Changes in 2.0.1
  • Added support for the new version of *osqp*, which changes some optional argument names and defaults. These should not impact results.
  • Added tests for *clarabel*.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.1 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-26
  • WARNING5 OK, 9 WARNING2026-03-10
Advisories

none known

Documentation

In release 2.0.1
READMEYes · 680 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 2.0.1Citation fileNoWebsiteYes · pkgdown
Help pages
8 (1 internal)includes a package overview page
Examples that run
100%7 run in a plain check (7 of them under a condition)
Exported functions with examples
100%
Documented parameters
92%
Return-value docs
100%
Help pages citing references
63%

Downloads

44.1K
CRAN downloads in the past year
Rank #2,270 · ~121/day · ~3.7K/mo
Daily download trend is not available in this view yet.
2.4K30 days
7.4K90 days
44.1K1 year
Compare downloads with other packages →
Also on147 r2u5 autocran74 c2d4u

Repository

11Stars
3Forks
1Open issues
0Open PRs
0Releases
242Commits
3Commit identities
causal-inferenceinverse-probability-weightspropensity-scoresobservational-studyoptimization
242 commits · Last activity 2026-06-08 · +10% stars, 30d · Default branch at 2.0.1.9000, ahead of CRAN 2.0.1 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
not measured
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
not measured

Stars over time

2023-10-20 · 82026-10-08 · 11
PracticesBeta

7 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/ngreifer/optweight on 2026-10-18.

Continuous integration (1)
GitHub Actions
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-04-10 · The repository has a site deploy workflow

pkgdown site last built 2026-04-10

Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)

Installing optweight adds 21 packages (10 with compiled code, 18 MB of source tarballs). Heaviest: ggplot2 6.0 MB, Rcpp 1.8 MB, isoband 1.5 MB.

Depends (1)
R >= 4.1.0
Imports (10)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 3
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.1.0 (2018)
Releases (10)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 2.0.1Latest
    record
    2026-03-19 · current release · diff ↗
  • 2.0.0
    record
    2026-01-24 · diff ↗
  • 1.0.0
    record
    2025-09-09 · diff ↗ ·
    added 4 exports
    optweightMV, optweightMV.fit, process_targets, process_tols
  • 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
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.5
    record
    2019-09-16 · diff ↗
  • unarchivedReturned to CRAN
    2019-09-03
  • archivedRemoved from CRAN
    2019-09-03
    check issues were not corrected Depends on broken package 'osqp'
  • 0.2.4
    record
    2019-09-03 · diff ↗
  • 0.2.3
    record
    2019-08-26 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
Show 5 earlier eventsHide 5 earlier events

Package metadata

First published
2018-09-22
Total releases
10 / 8 yrs
License
GPL
Minimum R
≥ 4.1.0
Download size
581 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("optweight")
Greifer, N. (2026). optweight: Optimization-Based Stable Balancing Weights (Version 2.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.optweight

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for optweight version 2.0.1 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy