# NOT RUN {
#This loads the classic Lalonde (1986) dataset,
#as well as two matched datasets:
#one from 1:1 propensity score matching,
#and one from cardinality matching, where
#the standardized covariate mean differences are all below 0.1.
data("lalondeMatches")
#obtain the covariates for these datasets
X.lalonde = subset(lalonde, select = -c(treat))
X.matched.ps = subset(lalonde.matched.ps, select = -c(treat,subclass))
X.matched.card = subset(lalonde.matched.card, select = -c(treat,subclass))
#the treatment indicators are
indicator.lalonde = lalonde$treat
indicator.matched.ps = lalonde.matched.ps$treat
indicator.matched.card = lalonde.matched.card$treat
#the standardized covariate mean differences
#for these three datasets are:
getStandardizedCovMeanDiffs(
X.matched = X.lalonde,
indicator.matched = indicator.lalonde)
getStandardizedCovMeanDiffs(
X.matched = X.matched.ps,
indicator.matched = indicator.matched.ps,
X.full = X.lalonde,
indicator.full = indicator.lalonde)
getStandardizedCovMeanDiffs(
X.matched = X.matched.card,
indicator.matched = indicator.matched.card,
X.full = X.lalonde,
indicator.full = indicator.lalonde)
# }
Run the code above in your browser using DataLab