我想在加权总体的变量之间进行卡方检验和 t 检验。我如何使用计算出的权重执行这些测试?
例如:
library(cobalt)
library(WeightIt)
data("lalonde", package = "cobalt")
W.out <- weightit(treat ~ age + educ + race + nodegree + re74 + re75,
data = lalonde, estimand = "ATT", method = "ps")
我想在
race
和nodegree
之间进行加权卡方检验;以及 age
和 race
的 t 检验。我如何使用权重进行这些测试?