I am running coarsened exact matching (CEM) via the package MatchIt as a pre-processing step and want to use the matched data in further analyses. As a test, I ran CEM using the package cem, and noticed that the imbalance measure differed from the one via the MatchIt package. For example, using the LaLonde dataset:
library(MatchIt)
library(cem)
data(LL)
re74cut <- seq(0, 40000, 5000)
re75cut <- seq(0, max(LL$re75)+1000, by=1000)
agecut <- c(20.5, 25.5, 30.5,35.5,40.5)
my.cutpoints <- list(re75=re75cut, re74=re74cut, age=agecut)
matchit.match <- matchit(treated ~ age + education + black + married + nodegree +
re74 + re75 + hispanic + u74 + u75,
data = LL,
method = "cem",
cutpoints = my.cutpoints)
matchit.data <- match.data(matchit.match)
matchit.imb <- imbalance(group=matchit.data$treated,
data=matchit.data,
drop=c("treated","re78","distance",
"weights","subclass"))
cem.match <- cem(treatment = "treated",
data = LL, drop = "re78",
cutpoints = my.cutpoints,
eval.imbalance = TRUE)
matchit.imb
cem.match$imbalance
Does anybody know what is going on here? Thank you for any help.