Obtain Unweighted Natural Strata that Balance Many Covariates
Linear program that selects which controls to use in order to optimize...
Check covariate balance of the control and treated groups
Create matrix of balance constraints for linear program
Create matrix of distances between strata
Generate constraints to encourage covariate balance
Calculate desired number of controls per stratum
Calculate standardized differences
natstrat: Obtain Unweighted Natural Strata that Balance Many Covariate...
Select control units that optimize covariate balance
Parse the nonstandard balance formulas
Plot standardized differences in means
Solve the earthmover's distance problem
Process the desired sample sizes for optimize_controls()
Sample integer solution from linear programming solution with sample s...
Sample integer solution from linear programming solution with correct ...
Standardize covariate vector for balance constraint
Verify the inputs to the earthmover's distance problem
Verify the inputs to optimize_controls()
Verify the inputs for supplemental comparisons to `optimize_controls()...
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/>.
Useful links