Package: natstrat 2.0.0

natstrat: Obtain Unweighted Natural Strata that Balance Many Covariates

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. To solve the linear program, the 'Gurobi' commercial optimization software is recommended, but not required. The 'gurobi' R package can be installed following the instructions at <https://www.gurobi.com/documentation/9.1/refman/ins_the_r_package.html>.

Authors:Katherine Brumberg [aut, cre]

natstrat_2.0.0.tar.gz
natstrat_2.0.0.zip(r-4.5)natstrat_2.0.0.zip(r-4.4)natstrat_2.0.0.zip(r-4.3)
natstrat_2.0.0.tgz(r-4.5-any)natstrat_2.0.0.tgz(r-4.4-any)natstrat_2.0.0.tgz(r-4.3-any)
natstrat_2.0.0.tar.gz(r-4.5-noble)natstrat_2.0.0.tar.gz(r-4.4-noble)
natstrat_2.0.0.tgz(r-4.4-emscripten)natstrat_2.0.0.tgz(r-4.3-emscripten)
natstrat.pdf |natstrat.html
natstrat/json (API)
NEWS

# Install 'natstrat' in R:
install.packages('natstrat', repos = c('https://kkbrum.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/kkbrum/natstrat/issues

Pkgdown site:https://kkbrum.github.io

Datasets:
  • nh0506 - Homocysteine and smoking example data
  • nh0506_3groups - Homocysteine and smoking example data with multiple control groups

On CRAN:

Conda:

3.70 score 3 scripts 254 downloads 6 exports 82 dependencies

Last updated 3 years agofrom:92d452124e. Checks:4 OK, 5 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 10 2025
R-4.5-winOKMar 10 2025
R-4.5-macOKMar 10 2025
R-4.5-linuxOKMar 10 2025
R-4.4-winNOTEMar 10 2025
R-4.4-macNOTEMar 10 2025
R-4.4-linuxNOTEMar 10 2025
R-4.3-winNOTEMar 10 2025
R-4.3-macNOTEMar 10 2025

Exports:check_balancecreate_dist_matrixgenerate_constraintsgenerate_qsoptimize_controlsstand

Dependencies:caretclasscliclockcodetoolscolorspacecpp11data.tablediagramdigestdplyre1071fansifarverforeachfuturefuture.applygenericsggplot2globalsgluegowergtablehardhatipredisobanditeratorsKernSmoothlabelinglatticelavalifecyclelistenvlpSolvelubridatemagrittrMASSMatrixmgcvModelMetricsmunsellnlmennetnumDerivparallellypillarpkgconfigplyrppspROCprodlimprogressrproxypurrrR6ramifyRColorBrewerRcpprecipesreshape2RglpkrlangrpartsamplingscalesshapeslamsparsevctrsSQUAREMstringistringrsurvivaltibbletidyrtidyselecttimechangetimeDatetzdbutf8vctrsviridisLitewithr

Introduction to natstrat

Rendered fromnatstrat.Rmdusingknitr::rmarkdownon Mar 10 2025.

Last update: 2021-10-15
Started: 2021-05-14