https://github.com/cran/cutpointr
Raw File
Tip revision: 7e56c827a694247d212e9a0167a119f917e1f31b authored by Christian Thiele on 31 August 2018, 15:50:10 UTC
version 0.7.4
Tip revision: 7e56c82
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 object}
\usage{
add_metric(object, metric)
}
\arguments{
\item{object}{A cutpointr object.}

\item{metric}{(list) A list of metric functions to be added.}
}
\value{
A 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{cutpointr_}},
  \code{\link{cutpointr}}, \code{\link{multi_cutpointr}},
  \code{\link{predict.cutpointr}}, \code{\link{roc}}
}
\concept{main cutpointr functions}
back to top