R 倾向得分与附加条件匹配

问题描述 投票:0回答:0

我有一个看起来像这样的队列:

id exposure sex age time
 1        0   F  50  300
 2        0   F  55  320
 3        0   F  60  365
 4        0   M  60  335
 5        0   M  65  350
 6        0   M  70  365
 7        1   F  50  310
 8        1   F  50  325
 9        1   M  65  340
10        1   M  70  345

我需要根据

exposure
(因变量)创建单独的匹配组,匹配协变量
age
sex
(自变量)。但我还必须强调,对于每场比赛,“暴露”(
time
) 观察与“未暴露”(
exposure == 1
) 比赛相比,
exposure == 0
更大。

我计划使用

MatchIt
命令进行我的倾向得分匹配,但我认为没有办法添加要求
time
暴露与未暴露更大的标准。

感谢任何建议!

r glm propensity-score-matching
© www.soinside.com 2019 - 2024. All rights reserved.