Create the Fagan nomogram for Bayesian analysis in diagnostic testing
Usage
nomogrammer(
Prevalence,
Sens = NULL,
Spec = NULL,
Plr = NULL,
Nlr = NULL,
Detail = FALSE,
NullLine = FALSE,
LabelSize = (14/5),
Verbose = FALSE
)
Arguments
- Prevalence
Prior probability / prevalence as a number between 0 and 1
- Sens
Model sensitivity as a number between 0 and 1 (optional if Plr/Nlr provided)
- Spec
Model specificity as a number between 0 and 1 (optional if Plr/Nlr provided)
- 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
If TRUE, will overlay key statistics onto the plot
- NullLine
If TRUE, will add a line from prior prob through LR = 1
- LabelSize
Tweak this number to change the label sizes
- Verbose
Print out relevant metrics in the console