nomogrammer {petersenlab}R Documentation

Create Nomogram.

Description

Create nomogram plot.

Usage

nomogrammer(
  TP = NULL,
  TN = NULL,
  FP = NULL,
  FN = NULL,
  pretestProb = NULL,
  SN = NULL,
  SP = NULL,
  PLR = NULL,
  NLR = NULL,
  Detail = FALSE,
  NullLine = FALSE,
  LabelSize = (14/5),
  Verbose = FALSE
)

Arguments

TP

Number of true positive cases.

TN

Number of true negative cases.

FP

Number of false positive cases.

FN

Number of false negative cases.

pretestProb

Pretest probability (prevalence/base rate/prior probability) of characteristic, as a number between 0 and 1.

SN

Sensitivity of the test at a given cut point, as a number between 0 and 1.

SP

Specificity of the test at a given cut point, as a number between 0 and 1.

PLR

Positive likelihood ratio of the test at a given cut point.

NLR

Positive likelihood ratio of the test at a given cut point.

Detail

If TRUE, overlay key statistics onto the plot.

NullLine

If TRUE, add a line from prior prob through LR = 1.

LabelSize

Label size.

Verbose

Print out relevant metrics in the console.

Details

Create nomogram plot from the following at a given cut point:

Value

ggplot object of nomogram plot.

See Also

https://github.com/achekroud/nomogrammer

Other accuracy: accuracyAtCutoff(), accuracyAtEachCutoff(), accuracyOverall(), optimalCutoff()

Examples


nomogrammer(
  TP = 253,
  TN = 386,
  FP = 14,
  FN = 347)

nomogrammer(
  pretestProb = .60,
  SN = 0.421,
  SP = 0.965)

nomogrammer(
  pretestProb = .60,
  PLR = 12,
  NLR = 0.6)


[Package petersenlab version 1.0.0 Index]