生活,有时候就需要些技巧~
使用 nomogram
绘制列线图时,有个参数fun,输入计算特定时间点的生存函数,如果是多个时间点的话,则使用列表形式:
If more than one transformation is plotted, put them in a list, e.g.
list(function(x)x/2,function(x)2*x)
.
如计算
surv = Survival(fit) # 生存函数
surv1 = function(x) surv(1*365, lp=x) # 1年生存
s