我正在进行glm分析,并试图从Logit模型中绘制ROC曲线。
预测是
predicted_logit=predict(model_logit, type="response")
然后,我尝试绘制ROC曲线
preds_logit=performance(predicted_logit, measure="tpr", x.measure="fpr")
plot(preds_logit, main="ROC curve for the Logit model")
出现的错误是:
Error in performance(predicted_logit, measure = "tpr", x.measure = "fpr") :
Wrong argument types: First argument must be of type 'prediction'; second and optional third argument must be available performance measures!
您能帮我解决这个问题吗?
最佳