## STU1
data(stu1)
stu1.ps <- pscore(data = stu1,
formula = therapie~tgr+age)
stu1.match <- ps.match(object = stu1.ps,
ratio = 2,
caliper = 0.5,
givenTmatchingC = FALSE,
matched.by = "pscore",
setseed = 38902)
stu1.bal.match <- ps.balance(object = stu1.match,
sel = c("tgr","age"),
method = "stand.diff",
alpha = 20)
plot.stdf(x = stu1.bal.match,
main = "Stu1 study: Standardized differences",
cex.axis = 1.2,
legend.cex = 1.3,
cex.main = 1.5,
las = 1,
col.p = c("black", "gray"))
Run the code above in your browser using DataLab