Skip to content

natstrat

Obtain Unweighted Natural Strata that Balance Many Covariates

v2.0.1 · Feb 3, 2026 · GPL-3

Description

Natural strata can be used in observational studies to balance the distributions of many covariates across any number of treatment groups and any number of comparisons. These strata have proportional amounts of units within each stratum across the treatments, allowing for simple interpretation and aggregation across strata. Within each stratum, the units are chosen using randomized rounding of a linear program that balances many covariates. For more details, see Brumberg et al. (2022) <doi:10.1111/rssa.12848> and Brumberg et al.(2023) <doi:10.1093/jrsssc/qlad010>. To solve the linear program, the 'Gurobi' commercial optimization software is recommended, but not required. The 'gurobi' R package can be installed by following the instructions at <https://docs.gurobi.com/projects/optimizer/en/current/reference/r/setup.html> after claiming your free academic license at <https://www.gurobi.com/academia/academic-program-and-licenses/>.

Downloads

CRAN

279

Last 30 days

14485th

762

Last 90 days

2K

Last year

Trend: +40.9% (30d vs prior 30d)

r2u CRAN

10

Last 30 days

26

Last 90 days

113

Last year

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

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 Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘caret’

Package suggested but not available for checking: ‘gurobi’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 2, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 25, 2026
ERROR r-release-macos-x86_64

package dependencies

Package required but not available: ‘caret’

Package suggested but not available for checking: ‘gurobi’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

package dependencies

Package suggested but not available for checking: ‘gurobi’
NOTE r-oldrel-macos-x86_64

package dependencies

Package suggested but not available for checking: ‘gurobi’
NOTE r-oldrel-windows-x86_64

package dependencies

Package suggested but not available for checking: 'gurobi'

Dependency Network

Dependencies Reverse dependencies caret Rglpk plyr pps sampling ggplot2 rlang ramify slam natstrat

Version History

4 tracked
new 2.0.1 Mar 10, 2026
updated 2.0.1 ← 2.0.0 diff Feb 3, 2026
updated 2.0.0 ← 1.0.0 diff Oct 14, 2021
new 1.0.0 May 25, 2021