0

我正在尝试了解 predict.coxph() 的各种输出的含义。我目前正在尝试在训练集上拟合 cox 模型,然后使用训练集的结果系数在测试集(新数据集)中进行预测。

我从 predict.coxph() 帮助页面中看到,我可以使用它type = "survival"来提取个人的生存概率——它等于 exp(-expected)。

这是迄今为止我尝试使用 ISLR2 BrainCancer 数据的代码块。

set.seed(123)
n.training = round(nrow(BrainCancer) * 0.70) # 70:30 split
idx = sample(1:nrow(BrainCancer), size = n.training)
d.training = BrainCancer[idx, ]
d.test = BrainCancer[-idx, ]

# fit a model using the training set
fit = coxph(Surv(time, status) ~ sex + diagnosis + loc + ki + gtv + stereo, data = d.training)

# get predicted survival probabilities for the test set
pred = predict(fit, type = "survival", newdata = d.test)

生成的预测: predict(fit, type = "survival", newdata = d.test)

[1] 0.9828659 0.8381164 0.9564982 0.2271862 0.2883800 0.9883625 0.9480138 0.9917512 1.0000000 0.9974775 0.7703657 0.9252100 0.9975044 0.9326234 0.8718161 0.9850815 0.9545622 0.4381646 0.8236644

[20] 0.2455676 0.7289031 0.9063336 0.9126897 0.9988625 0.4399697 0.9360874

这些生存概率是否与特定时间点相关?从帮助页面上,听起来这些是newdata争论中后续时间的生存概率。这个对吗?

附加问题:

  • 在 predict.coxph 中如何估计基线危害?是否使用 Breslow 估计器?
  • 如果type = "expected"使用,这些值是累积风险吗?如果是,这些的相关时间点是什么?

谢谢!

4

0 回答 0