SampleSizeDiagnostics {SampleSizeDiagnostics} | R Documentation |
Calculate Sample Size for Evaluating a Diagnostic Test
Description
This function calculates the sample size needed for evaluating a diagnostic test based on sensitivity, specificity, prevalence, and desired precision.
Usage
SampleSizeDiagnostics(sn, sp, p, w = 0.1, CI = 0.95)
Arguments
sn |
Sensitivity of the diagnostic test. |
sp |
Specificity of the diagnostic test. |
p |
Prevalence of the disease. |
w |
Desired width of the confidence interval (default is 0.10). |
CI |
Confidence interval level, either 0.95 or 0.9 (default is 0.95). Only 0.95 and 0.9 are allowed. |
Details
Abstract of Buderer (1996): Careful consideration of statistical issues related to the choice of a sample size is critical for achieving meaningful results in research studies designed to evaluate diagnostic tests. When assessing the ability of a diagnostic test to screen for disease, the parameters sensitivity, specificity, and predictive values are of interest. Study sample size requirements can be calculated based on a clinically acceptable degree of precision. the hypothesized values of sensitivity and specificity, and the estimated prevalence of disease in the target population. The simple methods and tables in this paper guide the researcher when deciding how many subjects to sample in a study designed to estimate both the sensitivity and the specificity of a diagnostic test, given a specified precision and estimated disease prevalence.
Value
A data frame containing the calculated sample sizes and input parameters:
- Precision
Desired width of the confidence interval
- Sensitivity
Sensitivity of the diagnostic test
- Specificity
Specificity of the diagnostic test
- Prevalence
Prevalence of the disease
- SS_sensitivity
Sample size for sensitivity
- SS_specificity
Sample size for specificity
- Total_Sample_Size
Total sample size needed (maximum of ss_sensitivity and ss_specificity)
- CI
Confidence interval level
References
Buderer, N. M. F. (1996). Statistical methodology: I. Incorporating the prevalence of disease into the sample size calculation for sensitivity and specificity. Academic Emergency Medicine, 3(9), 895-900.
Examples
SampleSizeDiagnostics(sn = 0.9, sp = 0.85, p = 0.2, w = 0.1, CI = 0.95)
SampleSizeDiagnostics(sn = 0.9, sp = 0.85, p = 0.2, w = 0.1, CI = 0.9)