if(plot)plot.roc(roc,…)中出错:尝试绘制AUC图时,参数不能解释为逻辑参数

if(plot)plot.roc(roc,…)中出错:尝试绘制AUC图时,参数不能解释为逻辑参数,r,roc,R,Roc,我正试图得到一个AUC图,用于我在R和for中创建的回归模型 由于某些原因,我出现了以下错误 if(plot)plot.roc(roc,…)中出错:参数不能解释为逻辑参数 这是我的代码: glm.fit <- glm(TARGET ~ NAME_CONTRACT_TYPE, data = application_train, family = binomial) model_predtraining<-predict(glm.fit,application_train,type =

我正试图得到一个AUC图,用于我在R和for中创建的回归模型 由于某些原因,我出现了以下错误 if(plot)plot.roc(roc,…)中出错:参数不能解释为逻辑参数

这是我的代码:

glm.fit <- glm(TARGET ~ NAME_CONTRACT_TYPE, data = application_train, family = binomial)
model_predtraining<-predict(glm.fit,application_train,type = 'response')
roc(model_predtraining,application_train$TARGET,main='ROC Training',plot = 'ROC',PV = FALSE,MI = FALSE)

glm.fit如果使用
pROC
包中的
roc()
,则参数应为逻辑ie
TRUE
FALSE
。有关更多详细信息,请参阅
PV
MI
应该做什么?你看过吗?