https://github.com/cran/cutpointr
Revision 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC, committed by cran-robot on 27 March 2019, 09:10:03 UTC
1 parent 7e56c82
Raw File
Tip revision: 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC
version 0.7.6
Tip revision: 8883cb6
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 = NULL, class, silent = FALSE, ...)
}
\arguments{
\item{data}{A data frame.}

\item{x}{Character vector of predictor variables. If NULL all numeric columns.}

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

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

\item{...}{Further arguments to be passed to cutpointr_ (Use a quoted variable
name for subgroup).}
}
\value{
A data frame.
}
\description{
Runs \code{cutpointr_} over multiple predictor variables. If
\code{x = NULL}, \code{cutpointr_}
will be run using all numeric columns in the data set as predictors except for the
variable in \code{class} and, if given, \code{subgroup}.
}
\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")

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

(scp <- summary(mcp))
\dontrun{
tibble:::print.tbl(scp)
}

}
\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