https://github.com/cran/cutpointr
Raw File
Tip revision: 030e7096a6bb7c391a35b49ac6eea87ad3b6027a authored by Christian Thiele on 17 September 2019, 20:30:02 UTC
version 1.0.0
Tip revision: 030e709
add_metric.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_metric.R
\name{add_metric}
\alias{add_metric}
\title{Add metrics to a cutpointr or roc_cutpointr object}
\usage{
add_metric(object, metric)
}
\arguments{
\item{object}{A cutpointr or roc_cutpointr object.}

\item{metric}{(list) A list of metric functions to be added.}
}
\value{
A cutpointr or roc_cutpointr object (a data.frame) with one or more added columns.
}
\description{
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.
}
\examples{
library(dplyr)
library(cutpointr)
cutpointr(suicide, dsi, suicide, gender) \%>\%
  add_metric(list(ppv, npv)) \%>\%
  select(optimal_cutpoint, subgroup, AUC, sum_sens_spec, ppv, npv)
}
\seealso{
Other main cutpointr functions: \code{\link{boot_ci}},
  \code{\link{boot_test}}, \code{\link{cutpointr}},
  \code{\link{multi_cutpointr}},
  \code{\link{predict.cutpointr}}, \code{\link{roc}}
}
\concept{main cutpointr functions}
back to top