简体   繁体   English

我应该把结果变量放在 Matchit::matchit ()

[英]Should I put outcome variable in Matchit::matchit ()

I would like to perform a logistic regression by adjusting for propensity score.我想通过调整倾向得分来执行逻辑回归。 My question is, do I have to include the outcome (binary in my case) in the propensity score calculation?我的问题是,我是否必须在倾向得分计算中包括结果(在我的情况下为二进制)? Otherwise how else can I link the outcome variable to the matched data created?否则我怎么能将结果变量链接到创建的匹配数据?

library(MatchIt)
m.out<-matchit(treatment~var1+var2+var3+var4+outcome, data = data,method = "nearest", ratio=1)
dataMatched = match.data(m.out)
library(Zelig)
z.out = zelig(outcome ~ var1+var2+var3+var4, model = "logit",data = dataMatched )

The propensity score is stored as the variable distance in dataMatched , so you can include that as a covariate in your outcome regression just like any other covariate.倾向得分作为变量distance存储在dataMatched中,因此您可以将其作为协变量包含在结果回归中,就像任何其他协变量一样。 That said, you don't need to do this.也就是说,你不需要这样做。 Matching on the propensity score already uses the propensity score to adjust for imbalance, so you don't need to use it again in the outcome regression model, especially if you're including covariates.倾向得分的匹配已经使用倾向得分来调整不平衡,因此您不需要在结果回归 model 中再次使用它,尤其是在包含协变量的情况下。 It probably will not hurt, though.不过,它可能不会受到伤害。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM