| Type: | Package |
| Title: | Evaluation of Binary Diagnostic Test |
| Version: | 1.0.1 |
| Description: | Calculate the point estimator and its confidence interval for the quality parameters of a binary diagnostic test, such as sensitivity, specificity, positive and negative predictive value, positive and negative likelihood ratio, weighted Kappa coefficient, a global diagnostic accuracy index, prevalence in a cross-sectional study, and sensitivity, specificity, positive and negative likelihood ratio, and a global diagnostic accuracy index in a retrospective study. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Config/roxygen2/version: | 8.0.0 |
| URL: | https://github.com/migmontal/ebdt, https://migmontal.github.io/ebdt/ |
| Imports: | stats |
| Suggests: | knitr, readxl, rmarkdown, testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-08-20 12:38:04 UTC; Montero |
| Author: | Miguel Ángel Montero-Alonso
|
| Maintainer: | Miguel Ángel Montero-Alonso <mmontero@ugr.es> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-24 13:40:14 UTC |
ebdt: Evaluation of Binary Diagnostic Test
Description
Calculate the point estimator and its confidence interval for the quality parameters of a binary diagnostic test, such as sensitivity, specificity, positive and negative predictive value, positive and negative likelihood ratio, weighted Kappa coefficient, a global diagnostic accuracy index, prevalence in a cross-sectional study, and sensitivity, specificity, positive and negative likelihood ratio, and a global diagnostic accuracy index in a retrospective study.
Author(s)
Maintainer: Miguel Ángel Montero-Alonso mmontero@ugr.es (ORCID)
Authors:
Miguel Ángel Montero-Alonso mmontero@ugr.es (ORCID)
Juan de Dios Luna del Castillo jdluna@ugr.es (ORCID)
See Also
Useful links:
Calculate all parameters of a binary diagnostic test in a traverse or Cross-sectional study.
Description
This function calculate Sensitivity, Specificity, positive and negative predictive value, positive and negative Likelihood Ratio, Weighted Kappa coeficient, Youden Index, prevalence and their Confidence intervals in a traverse or Cross-sectional study, and Sensitivity, Specificity, Youden Index, positive and negative Likelihood Ratio in a Case Control or Retrospective study.
Usage
ebdt(
s1,
r1,
s0,
r0,
conflev = 0.95,
digits = 3,
study = TRUE,
verbose = TRUE,
print_table = TRUE,
quiet = FALSE
)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
study |
Logical. If TRUE in a traverse or Cross-sectional study, FALSE in a Case Control or Retrospective study. Default TRUE. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
print_table |
Logical. If TRUE, print 2x2 table. Default TRUE. |
quiet |
Logical. If TRUE, it reduces non-critical messages (maintains important warnings). Default is FALSE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
Calculate the point estimate and confidence intervals of the quality measures of a binary diagnostic test.
Value
No return value; prints formatted results to the console. List with: Sensitivity, Specificity, Youden_Index, Prevalence, PPV, NPV, PLR, NLR, Weighted_Kappa and their Confidence intervals.
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Gart, J.J., Nam J., (1988). Aproximate interval estimation of the ratio of binomial parameters: a review and corrections for skewness. Biometrics, 44: 323 – 338.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Simel D.L., Samsa, G.P., Matchar, D.B., (1991). Likelihood ratios with confidence: sample size estimation for diagnostic test studies. J. Clin Epidemiology, 44(8): 763-770.
Roldán Nofuentes J.A., Luna del Castillo J.D., Montero Alonso, M.A., (2009). Confidence intervals of weighted kappa coefficient of a binary diagnostic test. Communications in Statistics. Simulation and Computation, 38: 1562 – 1578.
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt(40, 5, 10, 45, conflev = 0.95, digits = 4)
Calculate the weighted Kappa coefficient
Description
This function calculate the Weighted Kappa Coeficient estimator, their standard error estimated with Wald and Logit confidence interval in a traverse study.
Usage
ebdt_kap(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the "Kappa" coefficient weighted by c (0.1..0.9) with Wald and Logit ICs
Value
data.frame, in columns: c_index, Kappa, StdError, CI_Wald_L, CI_Wald_U, CI_Logit_L, CI_Logit_U
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Roldán Nofuentes J.A., Luna del Castillo J.D., Montero Alonso, M.A., (2009). Confidence intervals of weighted kappa coefficient of a binary diagnostic test. Communications in Statistics. Simulation and Computation, 38: 1562 – 1578.
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_kap(40, 5, 10, 45)
Calculates the Negative likelihood ratio
Description
This function calculate the Negative Likelihood Ratio estimator, their standard error estimated and a confidence interval in a traverse or Cross-sectional study.
Usage
ebdt_nlr(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Negative likelihood ratio (LR-) with Simel and Gart - Nam ICs
Requires a 'gn_nlr()' function in the environment and 'rootall()' function in the environment (the robust version reviewed above is suitable).
Value
list with: - LinfGNLRn: lower limit of the IC GN for LR- - LsupGNLRn: upper limit of the IC GN for LR-
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Gart, J.J., Nam J., (1988). Aproximate interval estimation of the ratio of binomial parameters: a review and corrections for skewness. Biometrics, 44: 323 – 338.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_nlr(40, 5, 10, 45)
Calculates the Negative Predictive Value (only Cross-sectional study)
Description
This function calculate the Negative predictive value estimator, their standard error estimated and a confidence interval in a traverse.
Usage
ebdt_npv(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Negative Predictive Value (NPV) with Simel and Gart - Nam ICs
Value
list with: - est: NPV = r0 / (s0 + r0) - StdError: binomial standard error of NPV - CI: vector c(inf, sup) IC for NPV - CI_Method: "Agresti-Coull"
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_npv(40, 5, 10, 45)
Calculates the Positive likelihood ratio
Description
This function calculate the Positive Likelihood Ratio estimator, their standard error estimated and a confidence interval in a traverse or Cross-sectional study.
Usage
ebdt_plr(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Positive likelihood ratio (LR+) with Simel and Gart - Nam ICs
Requires a 'gn_plr()' function in the environment and 'rootall()' function in the environment (the robust version reviewed above is suitable).
Value
list with: - est: LR+ = Se / (1 - Sp) - std.err: EE(LR+) by delta method from the variance in log-LR+ - CI1.sl: lower limit (Simel, log-normal) - CI.su: upper limit (Simel, log-normal) - CI.gnl: lower limit (Gart & Nam) - CI.gnu: upper limit (Gart & Nam)
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Gart, J.J., Nam J., (1988). Aproximate interval estimation of the ratio of binomial parameters: a review and corrections for skewness. Biometrics, 44: 323 – 338.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Simel D.L., Samsa, G.P., Matchar, D.B., (1991). Likelihood ratios with confidence: sample size estimation for diagnostic test studies. J. Clin Epidemiology, 44(8): 763-770.
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_plr(40, 5, 10, 45)
Calculates the Positive Predictive Value (only Cross-sectional study)
Description
This function calculate the Positive predictive value estimator, their standard error estimated and a confidence interval in a traverse.
Usage
ebdt_ppv(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Positive Predictive Value (PPV) with Simel and Gart - Nam ICs
Value
list with: - est: PPV = s1 / (s1 + r1) - StdError: binomial standard error of PPV - CI: vector c(inf, sup) IC for NPV - CI_Method: "Agresti-Coull"
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Simel D.L., Samsa, G.P., Matchar, D.B., (1991). Likelihood ratios with confidence: sample size estimation for diagnostic test studies. J. Clin Epidemiology, 44(8): 763-770.
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_ppv(40, 5, 10, 45)
Calculate Prevalence (only Cross-sectional study)
Description
This function calculate prevalence estimator, their standard error estimated and a confidence interval in a traverse study.
Usage
ebdt_prev(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Prevalence (proportion of cases), standard error & Agresti-Coull CI
Value
list with: - Prevalence: prevalence estimation prev = (s1 + s0)/(s1 + s0 + r1 + r0) - StdError: binomial standard error of prevalence - CI: vector c(inf, sup) IC for prevalence - CI_Method: "Agresti-Coull"
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_prev(40, 5, 10, 45)
Calculate Sensitivity
Description
This function calculate the sensitivity estimator, their standard error estimated and a confidence interval in a traverse or Cross-sectional study.
Usage
ebdt_se(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the sensitivity, standard error & Agresti-Coull CI
- Apply continuity correction (Haldane–Anscombe) *in pairs* if there are zeros: (s1,s0) and/or (r1,r0), avoiding adding 0.5 to cells not related to the estimated proportion. - For Wilson, the standard center and half-width are used: center = (p + z^2/(2n)) / (1 + z^2/n) half = z/(1 + z^2/n) * sqrt(p(1-p)/n + z^2/(4n^2)) - For Agresti-Coull: n_tilde = n + z^2; p_tilde = (x + z^2/2)/n_tilde; half = z*sqrt(p_tilde(1-p_tilde)/n_tilde)
Value
list with: - Sensitivity: sensitivity estimation (Se = s1/(s1+s0)) - StdError: binomial standard error of Se - CI: vector c(inf, sup) IC for Se - CI_Method: "Agresti-Coull"
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_se(40, 5, 10, 45)
Calculate Specificity
Description
This function calculate the specificity estimator, their standard error estimated and a confidence interval in a traverse or Cross-sectional study.
Usage
ebdt_sp(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Specificity, standard error & Agresti-Coull CI
- Apply continuity correction (Haldane–Anscombe) *in pairs* if there are zeros: (r1,r0) y/o (s1,s0), +0.5 is added to both cells of the pair. - Agresti-Coull: n_tilde = n + z^2 p_tilde = (x + z^2/2)/n_tilde half = z * sqrt( p_tilde(1-p_tilde) / n_tilde )
Value
list with: - Specificity: Specificity estimation (Sp = r0/(r1+r0)) - StdError: binomial standard error of Sp - CI: vector c(inf, sup) IC for Sp - CI_Method: "Agresti-Coull
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_sp(40, 5, 10, 45)
Calculate Youden index
Description
This function calculate Youden index estimator, their standard error estimated and a confidence interval in a traverse or Cross-sectional study.
Usage
ebdt_you(s1, r1, s0, r0, conflev = 0.95, digits = 3, verbose = TRUE)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
verbose |
Logical. If TRUE, it prints the execution time. Default is TRUE. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
This function calculates the Youden Index, standard error & Agresti-Coull CI
- Corrección Haldane–Anscombe *in pairs* if there are zeros: (s1,s0) and/or (r1,r0), +0.5 is added to both cells of the pair. - EE(J) is calculated as: sqrt( Se*(1-Se)/n_cases + Sp*(1-Sp)/n_ctrls ), valid under independence between cases and controls (common in diagnostic studies). - IC is constructed with normal approximation: J ± z * EE(J).
Value
list with: - YoudenIndex: Youden Index estimation J = Se + Sp - 1 - StdError: standard error of J by delta method assuming independence of cases and controls - CI: approximate normal confidence interval for J
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Agresti, A., Coull, B.A., (1998). Approximate is better than ‘exact’ for interval estimation of binomial proportions. The American Statistician, 52:119 – 126.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Youden, W.J., (1950). Index for rating diagnostic tests. Cancer, 3: 32 – 35.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
ebdt_you(40, 5, 10, 45)
Calculate Gart-Nam CI for negative likelihood ratio
Description
This function calculate Gart-Nam Confidence Interval for Negative Likelihood Ratio.
Usage
gn_nlr(s1, r1, s0, r0, conflev = 0.95, digits = 3)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
Gart-Nam (GN) CI for negative likelihood ratio (LR-)
Requires a 'rootall()' function in the environment (the robust version reviewed above is suitable).
Value
list with: - LinfGNLRn: lower limit of the IC GN for LR- - LsupGNLRn: upper limit of the IC GN for LR-
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Gart, J.J., Nam J., (1988). Aproximate interval estimation of the ratio of binomial parameters: a review and corrections for skewness. Biometrics, 44: 323 – 338.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
gn_nlr(40, 5, 10, 45)
Calculate Gart-Nam CI for positive likelihood ratio
Description
This function calculate Gart-Nam Confidence Interval for Positive Likelihood Ratio.
Usage
gn_plr(s1, r1, s0, r0, conflev = 0.95, digits = 3)
Arguments
s1 |
Non-negative numeric. TP - True positive (cases correctly classified as +). |
r1 |
Non-negative numeric. FP - False positives (controls classified as +). |
s0 |
Non-negative numeric. FN - False negatives (cases classified as -). |
r0 |
Non-negative numeric. TN - True negatives (controls classified as -). |
conflev |
Confidence level (0,1). Default 0.95. |
digits |
Integer. Number of decimal places. Default 3. |
Details
Evaluating of Binary Diagnostic Test (EBDT)
Gart-Nam (GN) CI for positive likelihood ratio (LR+)
Requires a 'rootall()' function in the environment (the robust version reviewed above is suitable).
Value
list with: - LinfGNLRp: lower limit of the IC GN for LR+ - LsupGNLRp: upper limit of the IC GN for LR+
References
Agresti, A., (2002). Categorical Data Analysis. John Wiley and Sons, New York.
Gart, J.J., Nam J., (1988). Aproximate interval estimation of the ratio of binomial parameters: a review and corrections for skewness. Biometrics, 44: 323 – 338.
Montero-Alonso, M.Á.(2010). Intervalos de confianza y contrastes de hipótesis para parámetros de tests diagnósticos binarios, http://hdl.handle.net/10481/4879
Pepe, M. S. (2003). The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
Zhou, X.-H., Obuchowski, N. A., y McClish, D. K. (2011). Statistical Methods in Diagnostic Medicine (2.ª ed.). John Wiley & Sons.
Examples
gn_plr(40, 5, 10, 45)
rootall
Description
Function to locate multiple roots using a grid and uniroot.
It is an auxiliary function used to calculate Gart-Nam Confidence Interval for Likelihood Ratios (LR+ and LR-). It finds all roots of a function within a specified interval using a grid-based approach and the uniroot method.
Usage
rootall(
f,
interval,
lower,
upper,
tol = .Machine$double.eps^0.2,
maxiter = 20,
n = 1000,
...
)
Arguments
f |
Function to be evaluated. |
interval |
Vector with lower and upper limits. |
lower |
Lower limit. |
upper |
Upper limit. |
tol |
Tolerance. |
maxiter |
Maximum iterations. |
n |
Number of nodes in the grid. |
... |
Additional arguments for f. |