Skip to contents

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

Usage

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. The data frame should contain the variables specified in the 'variables' option.

gold

The golden standard variable.

goldPositive

The positive level of the golden standard variable.

newtest

The new test variable.

testPositive

The positive level of the new test variable.

pp

Boolean selection whether to show prior probability. Default is 'false'.

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 table. Default is 'false'.

fnote

Boolean selection whether to show footnotes. Default is 'false'.

ci

Boolean selection whether to show 95\ Default is 'false'.

fagan

Boolean selection whether to show Fagan Nomogram. Default is 'false'.

Value

A results object containing:

results$text1a preformatted
results$text2a html
results$cTablea table
results$nTable2a preformatted
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
# }