微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

匹配边界 - 未使用的参数结果 = "re78"

如何解决匹配边界 - 未使用的参数结果 = "re78"

我正在关注 King 等人关于如何使用 MatchingFrontier R 程序 pdf here 的小插图,

但我收到以下错误

makeFrontier 中的错误(dataset = lalonde,treatment = "treat",结果 = "re78",: 未使用的参数 (outcome = "re78")"

我发现其他人也遇到同样的错误,但没有解决方案。有人认为这与版本有关 - GitHub 调用安装了 2.0.3 版。我不知道该怎么做。有什么想法吗?

我使用的代码直接来自上面链接的小插图:

library(devtools)
install_github('ChristopherLucas/MatchingFrontier')

library(MatchingFrontier)
data('lalonde')

# Create a vector of column names to indicate which variables we
# want to match on. We will match on everything except the treatment
# and the outcome.
 match.on <- colnames(lalonde)[!(colnames(lalonde) %in% c('re78','treat'))]
 match.on # Print variables in match.on

 # Make the mahalanobis frontier
 my.frontier <- makeFrontier(dataset = lalonde,treatment = 'treat',outcome = 're78',match.on = match.on)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。