data(LL)
for(i in c(4:6,10:12))
LL[[i]] <- factor(LL[[i]])
L1.profile(LL$treated,LL, drop=c("treated","re78"), max.cut=10)
if(require(MatchIt)){
m2 <- matchit(treated ~ black + hispanic + married + nodegree + u74 + u75 + education +
age + re74 + re75, data=LL, distance="logit")
L1.profile(LL$treated,LL, drop=c("treated","re78"), max.cut=10,
weights=m2$w, add=TRUE, col="green", lty=2)
}
m1 <- cem("treated", LL, drop="re78")
L1.profile(LL$treated,LL, drop=c("treated","re78"), max.cut=10,
weights=m1$w, add=TRUE, col="blue", lty=3)
legend(5, 0.9, legend=c("raw data", "pscore", "cem"), lty=1:3, col=c("red", "green", "blue"))Run the code above in your browser using DataLab