我通过MatchIt和optmatch包进行了最佳匹配:
library(MatchIt)
library(optmatch)
data(lalonde)
optimal <- matchit(treat ~ age + educ + black, data = lalonde, method = "optimal", ratio = 2)
smry.opti <- summary(optimal, standardize = TRUE)
摘要似乎很好,但我总是收到以下警告信息:
"In fullmatch(d, min.controls = ratio, max.controls = ratio, omit.fraction = (n0 - :
Without 'data' argument the order of the match is not guaranteed
to be the same as your original data."
我发现了一些帖子,描述了类似的问题。有些人回答说,警告信息应该被忽略: https://lists.gking.harvard.edu/pipermail/matchit/2013-August/000538.html
我应该在代码中更改某些内容,还是可以忽略警告消息?
非常感谢你!