classificationplots: Generate plots for classification

Description Usage Arguments Value Author(s) Examples

View source: R/classificationplots.R

Description

Generate plots for classification of two groups given one continuous variable

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
classificationplots(
  response,
  outcome,
  levels,
  cutoffs.1 = NULL,
  cutoffs.2 = NULL,
  cutoffs.3 = NULL,
  xlab.3 = "Predicted probability",
  labels.3 = NULL,
  xlim.3 = NULL,
  ylim.3 = c(0, 10),
  pos.legend.2 = "right",
  pos.legend.3 = "topright"
)

Arguments

response

continuous variable that is used as a classifier

outcome

grouping variable

levels

levels of the grouping variable that are to be classified (should be of length 2)

cutoffs.1

cutoff values to be shown in the ROC curve

cutoffs.2

cutoff values to be shown in the sensitivity/specificity plot

cutoffs.3

cutoff values to be shown in the conditional distribution plot

xlab.3

label for x axis in conditional distribution plot

labels.3

legend labels for both groups in levels in conditional distribution plot

xlim.3

xlim for conditional distribution plot

ylim.3

ylim for conditional distribution plot

pos.legend.2

location for legend in sensitivity/specificity plot

pos.legend.3

location for legend in conditional distribution plot

Value

classificationplots returns three plots, and invisibly a dataframe containing sensitivities and specificities at all available threshold values.

Author(s)

Mathijs Deen

Examples

1
2
library(pROC)
classificationplots(aSAH$s100b,aSAH$outcome,levels=c("Good","Poor"))

mathijsdeen/mdmaTools documentation built on Dec. 21, 2021, 2:52 p.m.