View source: R/decisioncompare.h.R
decisioncompare | R Documentation |
Function for comparing multiple Medical Decision Tests. Compares sensitivity, specificity, positive predictive value, negative predictive value, and other metrics between different tests against the same golden standard. Includes statistical comparison using McNemar's test and confidence intervals for differences.
decisioncompare(
data,
gold,
goldPositive,
test1,
test1Positive,
test2,
test2Positive,
test3,
test3Positive,
pp = FALSE,
pprob = 0.3,
od = FALSE,
fnote = FALSE,
ci = FALSE,
plot = FALSE,
statComp = FALSE
)
data |
The data as a data frame. |
gold |
. |
goldPositive |
. |
test1 |
. |
test1Positive |
. |
test2 |
. |
test2Positive |
. |
test3 |
. |
test3Positive |
. |
pp |
. |
pprob |
Prior probability (disease prevalence in the community). Requires a value between 0.001 and 0.999, default 0.300. |
od |
Boolean selection whether to show frequency tables. Default is 'false'. |
fnote |
. |
ci |
. |
plot |
. |
statComp |
Perform statistical comparison between tests (McNemar's test and confidence intervals for differences). |
A results object containing:
results$text1 | a preformatted | ||||
results$text2 | a html | ||||
results$cTable1 | a table | ||||
results$epirTable1 | a table | ||||
results$cTable2 | a table | ||||
results$epirTable2 | a table | ||||
results$cTable3 | a table | ||||
results$epirTable3 | a table | ||||
results$comparisonTable | a table | ||||
results$mcnemarTable | a table | ||||
results$diffTable | a table | ||||
results$plot1 | an image | ||||
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$cTable1$asDF
as.data.frame(results$cTable1)
# example will be added
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.