Performance Plot

Share:

Description

Draw for all posible cutoffs, TP, FP, TN, FN, sensitivity, specificity and more.

Usage

1
2
3
4
5
6
performance.plot.ade(pred, event, data=NULL, vnames=NULL, cutoffs=NULL,
                     cutnames=NULL, main=NULL, xlab="cutoff", ylab="%",
                     xlim=NULL, xticks=12,
                     col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL, alpha=NULL,
                     nints=100, lty=NULL, lwd=2, stats=c(1, 2),
                     youden=TRUE, wall=0)

Arguments

pred
  • a numeric predictor vector

  • a string with the name of the variable in the data.frame

  • a formula yevent~pred

event
  • a numeric event vector

  • a string with the name of the variable in the data.frame

data

data.frame if used character string for (pred, event)

vnames

a vector of character strings with the labels for performance values in top legend

cutoffs

a vector of optional cutoffs, to draw vertical lines

cutnames

a vector of character strings with the names for optional cutoffs

main

an overall title for the plot

xlab

a title for the x axis

ylab

a title for the y axis

xlim

the x limits (x1, x2) of the plot

xticks

the number of ticks on the x axis or a vector of exact ticks

col

a vector of 4 colors, for the 4 areas in the plot (TP, TN, FP, FN)

tcol

color of the text in whole plot

bgcol

the background color for plot dekoration

lcol

color for the lines in plot, a vector of colors is possible

alpha

a parameter in [0, 1] for semi-transparency of points

nints

number of points for the areas and curves, precision of calculation

lty

a vector of line types

lwd

the line width for all lines, cutoff lines too

stats

a number or vector of numbers from 1 to 4 indicate what statistics are to be drawn

  • 1. Sensitivity

  • 2. Specificity

  • 3. PPV

  • 4. NPV

youden

logical asking whether to plot red line for youden-index maximum

wall

a number between 0 and 6 for selection the dekoration style of the plot.

Examples

1