Makes the match distance with strata specifications for
This function is largely unecessary to call outside of stratamatch, but it is
exported for the benefit of the user to aid in debugging. Note that this
function requires that the R package
optmatch is installed.
make_match_distances(object, model, method)
a strata object
(optional) formula for matching. If left blank, all
columns of the analysis set in
either "prop" for propensity score matching based on a glm fit
a match distance matrix for optmatch
dat <- make_sample_data(n = 75) # stratify with auto_stratify a.strat <- auto_stratify(dat, "treat", outcome ~ X2, size = 25) # make match distances. Requires optmatch package to be installed. md <- make_match_distances(a.strat, treat ~ X1 + X2, method = "mahal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.