C 统计量和 AUC 不一致

C statistic and AUC disagree

我发现当我使用 DescTools 的内置函数计算 C 统计量时,我得到的值与计算接受者操作特征曲线 (AUC) 下的面积时得到的值不同。对于逻辑回归,应该是一样的。 例如,考虑

> resp <- c(1,1,0,0)
> pred <- c(1,1,1,0)
> model <- glm(resp~pred, family = binomial())
> Cstat(model)
[1] 1
> roc(resp~pred)$auc
Area under the curve: 0.75

任何人都可以解释为什么我计算的 C 统计量和 AUC 不同,以及我应该为我的 C 统计量使用哪种度量。谢谢!

感谢您发现这一点。这是 Cstat() 中的错误,其中未正确处理关系。这将在 DescTools 0.99.35 版中修复。