I tried to reproduce the sample size calculations in Table 4 of the Obuchowski paper (2004) for a single ROC curve. For a significance level of 0.05, an expected AUC of 0.7, a desired power of 0.9 and kappa = 1, the sample size calculation should result in 33 patients for each of the two groups.
However, power.roc.test(auc=0.7, sig.level=0.05, power=0.9, kappa=1.0)
gives ncases = ncontrols = 40.21369 as a result.
Maybe the problem is that inside the function, the z-value for the significance level is calculated by zalpha <- qnorm(sig.level),
which gives the lower alpha percentile (-1.64 instead of 1.64), not the upper one. I think it should be: zalpha <- qnorm(sig.level, lower.tail = F) or, of course zalpha <- qnorm(1 - sig.level)
Thank you very much for your work and for maintaining this great package!
The text was updated successfully, but these errors were encountered: