如何使用引导样本计算多变量 cox 回归模型的 c 指数?

问题描述

我创建了一个多变量 cox 回归模型,如下所示:

fit14 <- coxph(Surv(SurvTime,Survstatus) ~ factor(GCSDxDich) + defectsize + log(OR1TiOR2) + OR2Age + factor(AutoorAllo) + factor(VPSorLPS))

现在我想获得这个模型的 c-index(一致性统计),通过自举校正过拟合。我遇到了应该可以为我执行此操作的软件包 pec

我的代码如下:

cindex(fit14,Surv(SurvTime,Survstatus) ~ factor(GCSDxDich) + defectsize + log(OR1TiOR2) + OR2Age + factor(AutoorAllo) + factor(VPSorLPS),crandat2,eval.times = 10,pred.times = 10,lyl = FALSE,cens.model = "cox",ipcw.refit = FALSE,ipcw.args = NULL,ipcw.limit = 0.95,tiedPredictionsIn = TRUE,tiedOutcomeIn = TRUE,tiedMatchIn = TRUE,splitMethod = "BootCv",B = 1000,model.args = NULL,model.parms = NULL,keep.models = FALSE,keep.residuals = FALSE,keep.pvalues = FALSE,keep.weights = FALSE,keep.index = FALSE,keep.matrix = FALSE,multiSplitTest = FALSE,confInt = FALSE,confLevel = 0.95,verbose = TRUE,savePath = NULL,slaveseed = NULL,na.action = na.fail)

但是,当我运行此代码时,出现此错误

Cindex for competing risks Error in UseMethod("predictEventProb",object) : no applicable method for 'predictEventProb' applied to an object of class "coxph"

我不知道我应该怎么做才能解决这个错误。你们能帮我吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)