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
multi_cutpointr.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cutpointr.R
\name{multi_cutpointr}
\alias{multi_cutpointr}
\title{Calculate optimal cutpoints and further statistics for multiple predictors}
\usage{
multi_cutpointr(data, x = colnames(data)[colnames(data) != class], class,
  silent = FALSE, ...)
}
\arguments{
\item{data}{A data frame.}

\item{x}{Character vector of predictor variables.}

\item{class}{The name of the outcome / independent variable.}

\item{silent}{Whether to suppress messages.}

\item{...}{Further arguments to be passed to cutpointr.}
}
\value{
A data frame.
}
\description{
Runs \code{cutpointr_} over multiple predictor variables. By default, \code{cutpointr_}
will be run using all columns in the data set as predictors except for the
variable in \code{class}.
}
\details{
The automatic determination of positive / negative classes and \code{direction}
will be carried out separately for every predictor variable. That way, if
\code{direction} and the classes are not specified, the reported AUC for every
variable will be >= 0.5. AUC may be < 0.5 if subgroups are specified as
\code{direction} is equal within every subgroup.
}
\examples{
library(cutpointr)

multi_cutpointr(suicide, x = c("age", "dsi"), class = "suicide",
                pos_class = "yes")

multi_cutpointr(suicide, x = c("age", "dsi"), class = "suicide",
                subgroup = "gender", pos_class = "yes")

}
\seealso{
Other main cutpointr functions: \code{\link{add_metric}},
  \code{\link{cutpointr_}}, \code{\link{cutpointr}},
  \code{\link{predict.cutpointr}}, \code{\link{roc}}
}
\concept{main cutpointr functions}
back to top