View source: R/confIntDiagnostic.R
confIntPairedDiagnostic | R Documentation |
Compute confidence intervals for relative sensitivity, relative specificity and relative likelihood ratios.
confIntPairedDiagnostic(
diseased,
nonDiseased,
names = c(1, 2),
conf.level = 0.95,
adjust = FALSE
)
diseased |
2 by 2 frequency table with results from both tests in the diseased population. First row and first column refers to negative test results. |
nonDiseased |
2 by 2 frequency table with results from both tests in the non-diseased population. First row and first column refers to negative test results. |
names |
Vector of length 2. Names of first and second diagnostic tests. First name refers to the test in the columns; second name refers to the test in the rows. 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 or equivalently column test versus row test) with the corresponding confidence interval.
Leonhard Held
Section 3.3 in Pepe, M.S. (2003) The statistical evaluation of medical tests for classification and prediction. Oxford University Press.
## Calculate confidence intervals for data from a study performing the
## the determination of chest pain
## history (CPH) and the
## Exercise stress test (EST) for patients with suspected or probably coronary
## heart disease (CHD).
diseased <- matrix(c(25, 183, 29, 786), ncol = 2, nrow = 2, byrow = TRUE)
nonDiseased <- matrix(c(151, 176, 46, 69), ncol = 2, nrow = 2, byrow = TRUE)
colnames(diseased) <- colnames(nonDiseased) <- c("CPH=0", "CPH=1")
rownames(diseased) <- rownames(nonDiseased) <- c("EST=0", "EST=1")
confIntPairedDiagnostic(diseased = diseased, nonDiseased = nonDiseased,
names = c("CPH", "EST"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.