roc {MDMA}R Documentation

Receiver operator characteristic

Description

Calculate ROC curve statistics.

[Stable]

Usage

roc(response, group, levels, state)

Arguments

response

response variable for which thresholds will be calculated.

group

group variable.

levels

relevant levels of group variable. Should have length 2.

state

state level of levels..

Value

Returns a list with the following elements:

data

data.frame with two columns, containing the response and group variable for each level in levels without missings.

rdf

ROC dataframe. This is a data.frame containing sensitivity and specificity values for all threshold values.

auc

Area under the ROC curve.

response

Response variable from input data.

group

Group variable from the input data.

levels

Used levels.

state

State level.

Author(s)

Mathijs Deen

Examples

roc(QIDS$QIDS, QIDS$depression, c("No","Yes"), "Yes") |>
  plot(ylim.3=c(0,.2))

[Package MDMA version 1.1.0 Index]