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,
  showNaturalLanguage = TRUE,
  showClinicalInterpretation = TRUE,
  showReportTemplate = FALSE,
  showAboutAnalysis = FALSE
)

Arguments

data

The data as a data frame. The data frame should contain the variables specified in the 'variables' option.

gold

The gold standard reference variable representing true disease status.

goldPositive

The level indicating presence of disease in the gold standard variable.

newtest

The diagnostic test variable being evaluated for performance.

testPositive

The level representing a positive result for the test under evaluation.

pp

Boolean selection whether to use known population prevalence instead of study prevalence.

pprob

Population disease prevalence as a proportion between 0.001 and 0.999.

od

Boolean selection whether to show original data frequency tables.

fnote

Boolean selection whether to show detailed explanatory footnotes.

ci

Boolean selection whether to calculate and display 95\ confidence intervals.

fagan

Boolean selection whether to generate a Fagan nomogram plot.

showNaturalLanguage

Boolean selection whether to show the natural language clinical summary.

showClinicalInterpretation

Boolean selection whether to show the clinical interpretation guide.

showReportTemplate

Boolean selection whether to show the copy-ready report template.

showAboutAnalysis

Boolean selection whether to show the about analysis section.

Value

A results object containing:

results$rawContingencya table
results$rawCountsa table
results$cTablea table
results$nTablea table
results$ratioTablea table
results$missingDataSummarya html
results$epirTable_ratioa table
results$epirTable_numbera table
results$plot1an image
results$naturalLanguageSummarya html
results$clinicalInterpretationa html
results$reportTemplatea html
results$aboutAnalysisa html

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

results$rawContingency$asDF

as.data.frame(results$rawContingency)

Examples

# \donttest{
# example will be added
# }