| Type: | Package | 
| Title: | Choosing Sample Size for Evaluating a Diagnostic Test | 
| Version: | 0.1.0 | 
| Description: | Calculates the sample size needed for evaluating a diagnostic test based on sensitivity, specificity, prevalence, and desired precision. Based on Buderer (1996) <doi:10.1111/j.1553-2712.1996.tb03538.x>. | 
| License: | GPL-3 | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.2.3 | 
| Suggests: | testthat, roxygen2, knitr, rmarkdown | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2024-07-22 05:46:01 UTC; kamal | 
| Author: | Mohamed Kamal [aut, cre] | 
| Maintainer: | Mohamed Kamal <mohamedkamalhospital@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-07-26 19:40:07 UTC | 
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)