Skip to contents

Function for combining multiple Medical Decision Tests and evaluating their performance. Calculate sensitivity, specificity, positive predictive value, negative predictive value for combined tests using different combination rules.

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

# \donttest{
# example will be added
# }