rbw
Residual Balancing Weights for Marginal Structural Models
Description
Residual balancing is a robust method of constructing weights for marginal structural models, which can be used to estimate (a) the average treatment effect in a cross-sectional observational study, (b) controlled direct/mediator effects in causal mediation analysis, and (c) the effects of time-varying treatments in panel data (Zhou and Wodtke 2020 <doi:10.1017/pan.2020.2>). This package provides three functions, rbwPoint(), rbwMed(), and rbwPanel(), that produce residual balancing weights for estimating (a), (b), (c), respectively.
Downloads
321
Last 30 days
14118th
710
Last 90 days
2.7K
Last year
Trend: +108.4% (30d vs prior 30d)
2
Last 30 days
26
Last 90 days
100
Last year
Trend: -77.8% (30d vs prior 30d)
3
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
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | NOTE |
| r-devel-linux-x86_64-debian-gcc | NOTE |
| 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 details (2 non-OK)
CRAN incoming feasibility
Maintainer: ‘Xiang Zhou <xiang_zhou@fas.harvard.edu>’ The BugReports field in DESCRIPTION has https://github.com/xiangzhou09/rbw which should likely be https://github.com/xiangzhou09/rbw/issues instead.
CRAN incoming feasibility
Maintainer: ‘Xiang Zhou <xiang_zhou@fas.harvard.edu>’ The BugReports field in DESCRIPTION has https://github.com/xiangzhou09/rbw which should likely be https://github.com/xiangzhou09/rbw/issues instead.
Check History
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
CRAN incoming feasibility
Maintainer: ‘Xiang Zhou <xiang_zhou@fas.harvard.edu>’ The BugReports field in DESCRIPTION has https://github.com/xiangzhou09/rbw which should likely be https://github.com/xiangzhou09/rbw/issues instead.
CRAN incoming feasibility
Maintainer: ‘Xiang Zhou <xiang_zhou@fas.harvard.edu>’ The BugReports field in DESCRIPTION has https://github.com/xiangzhou09/rbw which should likely be https://github.com/xiangzhou09/rbw/issues instead.
Code
Structure
Lines of code
1,378
Files
36
Compiled share
0%
Has compiled src
No
Language breakdown
API
Exported functions
4
Internal functions
4
Recent export changes
Testing & CI
Has tests
Yes
Test-to-code ratio
0.21
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
–
Unsafe pattern score
0
Dep constraint coverage
66.7%
Secret pattern count
0
Bundled 3rd-party code
2 items
Portability & License
Min R version
3.5.0
System requirements
–
C++ standard
–
License
GPL (>= 3)
License flags
SPDX valid, OSI approved
History
Versions
4
First release
2020-04-15
Latest release
2022-03-01
Avg cadence
158 days
Cold removal rate
100%
Dep drift
1
LOC over versions
Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.