答案 0 :(得分:1)
不要担心协变量的哪个值是“参考”值,而是直接估计感兴趣的数量。例如,您可以估算并获得针对x = 7的所有风险比的置信限。这是使用R rms
包时的简单方法,该包具有函数cph
,该函数是R survival
包coxph
函数的前端。
require(rms)
dd <- datadist(mydata); options(datadist='dd')
# Example model with 3 predictors, interaction with the variable
# x1 that you are interested in. So hazard ratios will depend on x2
# which we set to 10. Omit x2 from list() if want to use the default
# value (median/mode of x2). The following obtains hazard ratios for
# x1 = 6 7 8 9 against x1 = 7.
f <- cph(Surv(time, event) ~ x1 * x2 + x3, data=mydata)
contrast(f, list(x1=6 : 9, x2=10), list(x1=7, x2=10))
# Type ?contrast.rms to see how to plot these with confidence limits
要获得生存概率,请使用survest
函数,但请注意,您所拥有的列标题具有误导性,因为没有一个生存概率。