add_metric | R Documentation |
By default, the output of cutpointr includes the optimized metric and several other metrics. This function adds further metrics. Suitable metric functions are all metric functions that are included in the package or that comply with those standards.
add_metric(object, metric) ## S3 method for class 'cutpointr' add_metric(object, metric) ## S3 method for class 'multi_cutpointr' add_metric(object, metric) ## S3 method for class 'roc_cutpointr' add_metric(object, metric)
object |
A cutpointr or roc_cutpointr object. |
metric |
(list) A list of metric functions to be added. |
A cutpointr or roc_cutpointr object (a data.frame) with one or more added columns.
Other main cutpointr functions:
boot_ci()
,
boot_test()
,
cutpointr()
,
multi_cutpointr()
,
predict.cutpointr()
,
roc()
library(dplyr) library(cutpointr) cutpointr(suicide, dsi, suicide, gender) %>% add_metric(list(ppv, npv)) %>% select(optimal_cutpoint, subgroup, AUC, sum_sens_spec, ppv, npv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.