powered by
Calculate ROC curve statistics.
roc(response, group, levels, state)
Returns a list with the following elements:
data.frame with two columns, containing the response and group variable for each level in levels without missings.
data.frame
levels
ROC dataframe. This is a data.frame containing sensitivity and specificity values for all threshold values.
Area under the ROC curve.
Response variable from input data.
Group variable from the input data.
Used levels.
State level.
response variable for which thresholds will be calculated.
group variable.
relevant levels of group variable. Should have length 2.
group
state level of levels..
Mathijs Deen
roc(QIDS$QIDS, QIDS$depression, c("No","Yes"), "Yes") |> plot(ylim.3=c(0,.2))
Run the code above in your browser using DataLab