# NOT RUN {
# We first prepare the input X, Z, propensity score
attach(dt_Rouse)
X = cbind(female,black,bytest,dadeduc,momeduc,fincome)
Z = IV
propensity = glm(IV~female+black+bytest+dadeduc+momeduc+fincome,
family=binomial)$fitted.values
detach(dt_Rouse)
# Create distance lists with built-in options.
# Mahalanobis distance with propensity score caliper = 0.05
# and k = 100.
dist_list_pscore_maha = create_list_from_scratch(Z, X, p = propensity,
caliper_low = 0.05, k = 100, method = 'maha')
# More examples, including how to use a user-supplied
# distance function, can be found in the vignette.
# }
Run the code above in your browser using DataLab