使用意外事件 table 作为 pROC 包的输入

Using a contingency table as input for pROC Package

对于 pROC 包。我想知道如何使用 2x2 应急 table (TP/TN/FP/FN) 而不是 predictor/response 输入。

你不能

ROC 曲线显示了在每个可能的阈值下灵敏度和特异性如何变化。已在单个阈值处计算了意外事件 table,有关其他阈值的信息已丢失。因此,您无法根据此汇总数据计算出 ROC 曲线。

See this answer for more details on the reason why it is not possible.