# Choose 800 patients and 5 covariates to work with for the example
set.seed(15)
samp <- sample(1:nrow(rhc_X), 800)
cov_samp <- sample(1:26, 5)
# Let it create propensity score strata for you and then refine them
ref <- refine(X = rhc_X[samp, cov_samp], z = rhc_X[samp, "z"])
# Look at covariate balance for propensity score and refined strata
calc_smds(object = ref)
Run the code above in your browser using DataLab