我正在尝试将我的半参数比例风险模型和加速失效时间模型与指数基线进行比较。系数应该“相同”,但符号不同。
我在 R 中使用 coxph 和 survreg 函数。Coxph 给出没有截距的结果,surverg 给出有截距的结果。我知道我无法打开 coxph 基线危险的拦截。有什么办法可以关闭 survreg 的拦截吗?我在下面附上了我的结果。
此外,当我的目的是了解治疗效果时,对协变量进行截距重要吗?
> coxph(Surv(Time,Reason=="I")~AgeG, data = PTARdata)
Call:
coxph(formula = Surv(Time, Reason == "I") ~ AgeG, data = PTARdata)
coef exp(coef) se(coef) z p
AgeG0 -3.4241 0.0326 1.005 -3.406 6.6e-04
AgeG1 0.1232 1.1311 0.154 0.803 4.2e-01
AgeG2 -0.2774 0.7578 0.137 -2.023 4.3e-02
AgeG3 -0.0503 0.9509 0.146 -0.345 7.3e-01
AgeG4 0.2063 1.2292 0.203 1.014 3.1e-01
AgeG5 -0.1531 0.8581 0.147 -1.039 3.0e-01
AgeG6 -0.7706 0.4627 0.182 -4.238 2.3e-05
Likelihood ratio test=70.5 on 7 df, p=1.15e-12
> PTAR.ph.age2<-survreg(Surv(Time,Reason=="I")~AgeG,data = PTARdata, dist='weibull',scale=1)
> summary(PTAR.ph.age2)
Call:
survreg(formula = Surv(Time, Reason == "I") ~ AgeG, data = PTARdata,
dist = "weibull", scale = 1)
Value Std. Error z p
(Intercept) 8.9611 0.0891 100.588 0.00000
AgeG0 3.1638 1.0040 3.151 0.00163
AgeG1 -0.1332 0.1535 -0.868 0.38537
AgeG2 0.2740 0.1371 1.998 0.04571
AgeG3 0.0423 0.1458 0.290 0.77176
AgeG4 -0.2398 0.2031 -1.181 0.23778
AgeG5 0.1042 0.1465 0.712 0.47673
AgeG6 0.5469 0.1751 3.123 0.00179
Scale fixed at 1
Weibull distribution
Loglik(model)= -5087.9 Loglik(intercept only)= -5115.2
Chisq= 54.51 on 7 degrees of freedom, p= 1.9e-09
Number of Newton-Raphson Iterations: 11
关于是否可以关闭拦截,简短的回答是可以,在公式中包含 +0,因此 Surv(Time,Reason=="I")~AgeG+0。
但是,关闭拦截本质上始终是一个非常糟糕的主意。关闭截距与要求每个预测因子都为 0 的患者的生存时间对数恰好是误差项的分布,这在临床上是不合理的。垃圾输入=垃圾输出,所以是的,当你的目的是了解治疗效果时,拦截很重要,因为删除它会导致对治疗效果的错误估计。这是一个简单的演示。
x=c(rep(0,500),rep(1,500))
y=rweibull(500,shape=2,scale=5)
y=c(y,y*exp(4.2))
survreg(Surv(y)~x, dist="weibull") #x = 4.2, the correct answer
survreg(Surv(y)~x+0, dist="weibull") #x = 5.6, the incorrect answer
我认为在没有截距的情况下考虑回归通常是愚蠢的,甚至 Cox 模型在某种程度上也有截距;我们只是看不到它,因为它被基线危险吞没了。