我对患者人群的因变量进行了倾向分析,其取1/0
m.out = matchit(MatchedVar ~ Property1+Property2+Property3
, data = PropensityDB, method = "nearest", ratio = 1)
并且要绘制距离均值的新距离分布。我通过致电
来做到这一点bal.plot(m.out,var.name = "distance", which = "both")
并获得下图:
我想将“处理”标题更改为其他名称以正确命名组。
尝试了几种方法,但无法解决此问题。
有什么想法吗?
p <- bal.plot(m.out,var.name = "distance", which = "both")
p + scale_fill_discrete(name = "MatchedVar")