Skip to contents

Create the Fagan nomogram for Bayesian analysis in diagnostic testing

Create the Fagan nomogram for Bayesian analysis in diagnostic testing

Usage

nomogrammer(
  Prevalence = 0.4,
  Sens = 0.9,
  Spec = 0.8,
  Plr = NULL,
  Nlr = NULL,
  Detail = TRUE,
  NullLine = TRUE,
  LabelSize = 2.8,
  Verbose = FALSE
)

nomogrammer(
  Prevalence = 0.4,
  Sens = 0.9,
  Spec = 0.8,
  Plr = NULL,
  Nlr = NULL,
  Detail = TRUE,
  NullLine = TRUE,
  LabelSize = 2.8,
  Verbose = FALSE
)

Arguments

Prevalence

Prior probability / prevalence

Sens

Sensitivity

Spec

Specificity

Plr

Positive likelihood ratio (calculated from Sens and Spec if not provided)

Nlr

Negative likelihood ratio (calculated from Sens and Spec if not provided)

Detail

Whether to show detailed statistics on the plot

NullLine

Whether to show the null effect line

LabelSize

Size of text labels

Verbose

Whether to print additional information

Value

A ggplot object with the Fagan nomogram

A plot object with the Fagan nomogram

Examples

# Using sensitivity and specificity
nomogrammer(Prevalence = 0.3, Sens = 0.9, Spec = 0.8)


# Using likelihood ratios
nomogrammer(Prevalence = 0.3, Plr = 4.5, Nlr = 0.125)