ggadjustedcurves错误:Can';t使用矩阵或数组进行列索引
我得到这个信息: 错误:无法将矩阵或数组用于列索引ggadjustedcurves错误:Can';t使用矩阵或数组进行列索引,r,cox-regression,R,Cox Regression,我得到这个信息: 错误:无法将矩阵或数组用于列索引 您的数据必须是TIBLE格式。尝试: ggadjustedcurves(拟合,变量=“研究”,数据=数据。框架(数据),方法=“平均”) fit <- coxph(Surv(time, status)~Age + strata(Study), data) ggadjustedcurves(fit, variable="Study", data=data, method="average")
您的数据必须是TIBLE格式。尝试: ggadjustedcurves(拟合,变量=“研究”,数据=数据。框架(数据),方法=“平均”)
fit <- coxph(Surv(time, status)~Age + strata(Study), data)
ggadjustedcurves(fit, variable="Study", data=data, method="average")