Skip to contents

Combines multiple medical diagnostic tests and evaluates their collective performance using different combination rules. This function is essential for optimizing diagnostic accuracy when multiple tests are available for the same condition. Supports OR logic (positive if any test is positive), AND logic (positive only if all tests are positive), and majority rule (positive if more than half of tests are positive). Calculates comprehensive diagnostic performance metrics including sensitivity, specificity, positive and negative predictive values, likelihood ratios, and post-test probabilities for the combined test strategy. Useful for developing optimal test panels and understanding how multiple diagnostic tests perform together.

Usage

decisioncombine(
  data,
  gold,
  goldPositive,
  test1,
  test1Positive,
  test2,
  test2Positive,
  test3,
  test3Positive,
  combRule = "any",
  pp = FALSE,
  pprob = 0.3,
  od = FALSE,
  fnote = FALSE,
  ci = FALSE,
  fagan = FALSE,
  showIndividual = TRUE
)

Arguments

data

The data as a data frame.

gold

.

goldPositive

.

test1

.

test1Positive

.

test2

.

test2Positive

.

test3

.

test3Positive

.

combRule

Rule for combining test results. "any" means positive if any test is positive (OR), "all" means positive only if all tests are positive (AND), and "majority" means positive if more than half of tests are positive.

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

.

fagan

.

showIndividual

.

Value

A results object containing:

results$text1a preformatted
results$text2a html
results$cTablea table
results$indTable1a table
results$indTable2a table
results$indTable3a table
results$nTablea table
results$ratioTablea table
results$epirTable_ratioa table
results$epirTable_numbera table
results$plot1an image

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

results$cTable$asDF

as.data.frame(results$cTable)

Examples

# Basic two-test combination with OR rule
result1 <- decisioncombine(
  data = histopathology,
  gold = "Golden Standart",
  goldPositive = "1",
  test1 = "New Test",
  test1Positive = "1",
  test2 = "Rater 1",
  test2Positive = "1",
  test3 = NULL,
  test3Positive = NULL,
  combRule = "any"
)

# Three-test combination with AND rule
result2 <- decisioncombine(
  data = histopathology,
  gold = "Golden Standart",
  goldPositive = "1",
  test1 = "New Test",
  test1Positive = "1",
  test2 = "Rater 1",
  test2Positive = "1",
  test3 = "Rater 2",
  test3Positive = "1",
  combRule = "all",
  ci = TRUE, fagan = TRUE
)