confIntIndependentDiagnostic | R Documentation |
Compute confidence intervals for relative sensitivity, relative specificity and relative likelihood ratios.
confIntIndependentDiagnostic(
tp,
fp,
tn,
fn,
names = c(1, 2),
conf.level = 0.95,
adjust = FALSE
)
tp |
Vector of length 2. Number of true positives of the two tests. |
fp |
Vector of length 2. Number of false negatives of the two tests. |
tn |
Vector of length 2. Number of true negatives of the two tests. |
fn |
Vector of length 2. Number of false negatives of the two tests. |
names |
Vector of length 2. Names of first and second diagnostic tests. Default to c(1, 2). |
conf.level |
Confidence level for confidence interval. Default is 0.95. |
adjust |
Logical of length one indicating whether to compute adjusted CIs or not. Default is FALSE. |
A data.frame containing the estimated sensitivity, specificity, LR+ and LR- in the two tests, as well as the ratio (first versus second test) with the corresponding confidence interval.
Leonhard Held, Charlotte Micheloud
Pepe, M.S. (2003) The statistical evaluation of medical tests for classification and prediction. Oxford: Oxford University Press.
## Calculate confidence intervals for data from a (hypothetical)
## randomized unpaired study of early amniocentesis (EA)
## versus chorionic villus sampling (CVS)
## for fetal abnormality from
## Pepe (2003)
tp <- c(116, 111)
fp <- c(34, 111)
tn <- c(4844, 4765)
fn <- c(6, 13)
confIntIndependentDiagnostic(tp = tp, fp = fp, tn = tn, fn = fn,
names = c("EA", "CVS"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.