Learn R Programming

predictNMB (version 0.2.1)

get_inbuilt_cutpoint: Get a cutpoint using the methods inbuilt to predictNMB

Description

Get a cutpoint using the methods inbuilt to predictNMB

Usage

get_inbuilt_cutpoint(predicted, actual, nmb, method)

Value

Returns a selected cutpoint (numeric).

Arguments

predicted

A vector of predicted probabilities

actual

A vector of actual outcomes

nmb

A named vector containing NMB assigned to each classification

method

A cutpoint selection method to be used methods that can be used as the method argument

Examples

Run this code
## get the list of available methods:
get_inbuilt_cutpoint_methods()

## get the cutpoint that maximises the Youden index for a given set of
## probabilities and outcomes
get_inbuilt_cutpoint(
  predicted = runif(1000),
  actual = sample(c(0, 1), size = 1000, replace = TRUE),
  method = "youden"
)

Run the code above in your browser using DataLab