library(MatchIt); data("lalonde", package = "cobalt")
#Nearest Neighbor Matching
m.out <- matchit(treat ~ age + educ + black + hispan + 
                 married + nodegree + re74 + re75, 
                 data = lalonde)
bal.plot(m.out, "age")
bal.plot(m.out, "married")
Run the code above in your browser using DataLab