% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.decide.R
\name{plot.decide}
\alias{plot.decide}
\title{Decision Curve Analysis plots and regression model classification graphs on sensitivity and specificity}
\usage{
\method{plot}{decide}(
  x,
  y = NULL,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  lwd = NULL,
  bcol = NULL,
  lcol = NULL,
  add.legend = NULL,
  legend = NULL,
  cex = 1,
  cex.lab = NULL,
  cex.axis = NULL,
  cex.main = NULL,
  cex.legend = NULL,
  round.c = 2,
  ...
)
}
\arguments{
\item{x}{decide object.}

\item{y}{type of plot to display. Select either 'nb', 'is', or 'cl' for a decision curve
analysis 'net benefit' and 'interventions saved', or a model classification (e.g., sensitivity
and specificity) according to a selected threshold. Net benefit and interventions saved display
results for specific percentiles found between the 1st and 99th percentiles. Default is 'nb'.}

\item{main}{the main title of the plot.}

\item{xlab}{a character vector label for the x-axis.}

\item{ylab}{a character vector label for the y-axis.}

\item{xlim}{specify plot's x-axis limits with a 2 element numeric vector.}

\item{ylim}{specify plot's y-axis limits with a 2 element numeric vector. When y='is', the y-axis
labels are in integers (e.g., 1 to 100) but the actual scale is in decimals (0.0 to 1.0), please
note when making y-axis limits.}

\item{lwd}{select the line width.}

\item{bcol}{a multiple element character vector of length == 2  to specify the bar, band, or block colors that
are the shading of the true and false classification regions of the plot (e.g., true-positive and false-negative).
When y='cl', the first color represents 'true' and the second color is for 'negative'. Default is null, if none
selected, the colors are c('green', 'red').}

\item{lcol}{a single or multiple element character vector to specify the line color(s).
When y='nb', select up to 3 colors in this order for model, 'net benefit', 'all treated', and 'none treated' line colors.
When y='is', select 1 color for the interventions saved line. And when y='cl', select 1 color to represent the selected threshold.}

\item{add.legend}{add a legend by selecting the location as "bottomright", "bottom", "bottomleft",
"left", "topleft", "top", "topright", "right", "center". Default is no legend produced if nothing is selected.}

\item{legend}{a character vector of length >= 2 to appear when y='nb' and y='cl' with legend description.}

\item{cex}{A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default of 1.}

\item{cex.lab}{The magnification to be used for x and y labels relative to the current setting of cex.}

\item{cex.axis}{The magnification to be used for axis annotation relative to the current setting of cex.}

\item{cex.main}{The magnification to be used for main titles relative to the current setting of cex.}

\item{cex.legend}{The magnification to be used for the legend added into the plot relative to the current setting of 1.}

\item{round.c}{an integer indicating the number of decimal places when rounding numbers y='multi' and y='target'. Default is 2.}

\item{...}{additional arguments.}
}
\value{
plots of model classification, net benefit, and interventions saved.
}
\description{
Graph decide class object's model classification results as well as Decision Curve analysis output for
net benefit and interventions saved.
}
\examples{
## Predicting car engine shape type, v or straight  ##
# run the model
car_m1 <- assess(formula=vs ~ hp + am, data=mtcars, regression="logistic")
# create a decide object, enter the model name and a threshold on the logit scale
d1 <- decide(x=car_m1, threshold= -0.767)
#Plot the classification results
plot(x=d1, y= "cl")

#Plot the net benefit
plot(x=d1, y= "nb")

#Plot the interventions saved
plot(x=d1, y= "is")
}
\references{
Vickers, A. & Elkin, E. (2006). Decision Curve Analysis: A Novel Method for Evaluating Prediction Models.
Society for Medical Decision Making, 26, 6, 565-574. https://doi.org/10.1177/0272989X06295361
}
