Function to calculate total sample size for an ROC analysis for a single test

get_n_roc(z = 1.96, precision = 0.05, vf, p)

Arguments

z

The z-score/z-value for a 95% confidence interval. Typical vaues for z are 1.645 for a 90% confidence interval, 1.75 for a 92% confidence interval, 1.96 for a 95% confidence interval and 2.05 for a 96% confidence interval. Default is 1.96.

precision

The numeric value of the desired precision. Default is set at ±5% (0.05).

vf

Variance function of the area under the curve (AUC) for the received operator characteristic (ROC) surve sample size calculations

p

Prevalence or proportion of cases in the relevant population. Used to calculate ratio k of cases to non-cases in the relevant population

Source

Obuchowski NA. Fundamentals of clinical research for radiologists: ROC Analysis. American Journal of Roentgenology. 2005;184.

Value

A numeric value for the total sample size for an ROC analysis for a single test

Examples

get_n_roc(z = 1.96, precision = 0.05, vf = 0.00991024, p = 0.2)
#> [1] 76.14236