Error in Surv(data, OSd) : Time variable is not numeric R语言绘图报错
Aria
下载可以很简单
项目地址:https://gitcode.com/gh_mirrors/ar/Aria
免费下载资源
·
Error in Surv(data, OSd) : Time variable is not numeric R语言绘图报错
以下是问题片段:
// 建立cox模型
cph8 <- cph(Surv(data$OSd, data$OS) ~ HKLC, data = data)
// DCA曲线
dca_cph <- dca(cph8, model.names = c("HKLC stage"),times = c(365, 1095, 1825))
#head(dca_cph)
ggplot(dca_cph)#, lwd = 0.5
画图会报错
Error in Surv(data, OSd) : Time variable is not numeric
应该修改为
// 建立cox模型
cph8 <- cph(Surv(OSd, OS) ~ HKLC, data = data)
接下来ggDCA绘图,成功!!!
GitHub 加速计划 / ar / Aria
1
3
下载
下载可以很简单
最近提交(Master分支:5 个月前 )
b0d3c6dd - 7 个月前
8fd9634d - 7 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)