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.
Usage
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
)
Arguments
- 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).
Value
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)