Function for Medical Decision Analysis. Sensitivity, specificity, positive predictive value, negative predictive value.

decision(
  data,
  gold,
  goldPositive,
  newtest,
  testPositive,
  pp = FALSE,
  pprob = 0.3,
  od = FALSE,
  fnote = FALSE,
  ci = FALSE,
  fagan = FALSE
)

Arguments

data

The data as a data frame.

gold

.

goldPositive

.

newtest

.

testPositive

.

pp

.

pprob

Prior probability (disease prevelance in the community). Requires a value between 0.001 and 0.999, default 0.300.

od

Boolean selection whether to show frequency table. Default is 'false'.

fnote

.

ci

.

fagan

.

Value

A results object containing:

results$text1a preformatted
results$cTablea 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

if (FALSE) { # example will be added }