ctrl + y 可以删除一整行,请将不需要的内容删除
使用PredictABEL package时,出现
Error in table(c1, c2, data[, cOutcome]) :
all arguments must have the same length
但是我分别用length(c1), length(c2), length(cOutcome),结果都是相同的
想请问问题可能在哪里?
[问题类型]:
请把以下不需要的部份删除
经验咨询:IDI_NRI计算作表格
[软件熟悉度]:
新手入门
[问题叙述]:
使用PredictABEL跑IDI_NRI统计评估model
[程式范例]:
请把以下不需要的部份删除
coding:
library(PredictABEL)
m1 <- glm(d ~ va1, family=binomial(logit), data=dt)$fitted
m2 <- glm(d ~ va1 + GM, family=binomial(logit), data=dt)$fitted
value<-as.vector(quantile(m1))
cutoff <- c(0,value[2],value[3],value[4],1)
length(m1) # 确定length是否一样:149
length(m2) # 确定lenght:149
length(dt$va1) #length: 149
reclassification(predrisk1 = m1, predrisk2=m2,cOutcome = 3,
data = dt, cutoff = cutoff) # cOutcome =3, 第3栏为va1
Output:
_________________________________________
Reclassification table
_________________________________________
Error in table(c1, c2, data[, cOutcome]) :
all arguments must have the same length
length不是都一样?我也有用na.omit()去把可能的NA值去掉了,
但是仍然无法
[关键字]:
PredictABEL, IDI, NRI, model
选择性,也许未来有用