Skip to contents

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$text1a preformatted
results$text2a html
results$cTable1a table
results$epirTable1a table
results$cTable2a table
results$epirTable2a table
results$cTable3a table
results$epirTable3a table
results$comparisonTablea table
results$mcnemarTablea table
results$diffTablea table
results$plot1an image

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$cTable1$asDF

as.data.frame(results$cTable1)

Examples

# \donttest{
# example will be added
# }