# NOT RUN {
# take lalonde data as an example
# run matchit() to obtain the matching result (i.e., a matchit object)
m_out <- MatchIt::matchit(treat ~ re74 + re75 + age + educ + hispan +
black, data = MatchIt::lalonde, method = "nearest")
# use matching result and compute_smd() to obtain a SMD data
# frame
opt_smd <- compute_smd(m_out, sd = "treatment")
# }
Run the code above in your browser using DataLab