coxphfit+matlab,计算Cox比例风险模型的coxph和cph函数有什么区别?

RCS =受限立方样条。 您可以通过查看help(package="rms")

找到函数的帮助文件下面是源代码的摘录,所以你可以看到那里的cph函数调用coxph.fit功能(的coxph在survival包胆量)

>cph

[...]

if (nullmod)

f = NULL

else {

ytype = attr(Y, "type")

fitter = if (method == "breslow" || method == "efron") {

if (ytype == "right")

coxph.fit

else if (ytype == "counting")

survival:::agreg.fit

else stop(paste("Cox model doesn't support \"", ytype,

"\" survival data", sep = ""))

}

else if (method == "exact")

survival:::agexact.fit

[...]

class(f) = c("cph", "rms", "coxph")

f

}

两个cph和coxph给出了相同的结果尽可能系数:

>library("s

你可能感兴趣的:(coxphfit+matlab)