Predict outcome for new data

roc_predict(object, x_new, ...)

Arguments

object

Either an object which inherits from one of following classes: roc_result_list, roc_info, roc_info_multi, or a data frame with exactly one row, which contains columns: "cutoff" (numeric), "below" (character), "above" (character).

x_new

A numeric vector with data to predict on.

...

Arguments to further methods.

See also

Examples

library(manyROC) set.seed(1) x <- rnorm(10) gr <- gl(n = 2, k = 5, length = 10, labels = c("H", "S")) object <- roc_analysis(x, gr) roc_predict(object, x_new = 1)
#> [1] "S"
roc_predict(object, x_new = -1)
#> [1] "H"
roc_predict(object, x_new = rnorm(20))
#> [1] "S" "H" "H" "H" "S" "H" "H" "S" "S" "S" "S" "S" "H" "H" "S" "H" "H" "H" "H" #> [20] "S"