1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/plots.R 3\name{rocplot} 4\alias{rocplot} 5\title{Receiver Operator Characteristic Plots} 6\usage{ 7rocplot(z1, z2, 8cutoff = seq(from=0, to=1, length=100), lty1="solid", 9lty2="dashed", lwd1=par("lwd"), lwd2=par("lwd"), 10col1=par("col"), col2=par("col"), 11main="ROC Curve", 12xlab = "Proportion of 1's Correctly Predicted", 13ylab="Proportion of 0's Correctly Predicted", 14plot = TRUE, 15... 16) 17} 18\arguments{ 19\item{z1}{first model} 20 21\item{z2}{second model} 22 23\item{cutoff}{A vector of cut-off values between 0 and 1, at which to 24evaluate the proportion of 0s and 1s correctly predicted by the first and 25second model. By default, this is 100 increments between 0 and 1 26inclusive} 27 28\item{lty1}{the line type of the first model (defaults to 'line')} 29 30\item{lty2}{the line type of the second model (defaults to 'dashed')} 31 32\item{lwd1}{the line width of the first model (defaults to 1)} 33 34\item{lwd2}{the line width of the second model (defaults to 1)} 35 36\item{col1}{the color of the first model (defaults to 'black')} 37 38\item{col2}{the color of the second model (defaults to 'black')} 39 40\item{main}{a title for the plot (defaults to "ROC Curve")} 41 42\item{xlab}{a label for the X-axis} 43 44\item{ylab}{a lavel for the Y-axis} 45 46\item{plot}{whether to generate a plot to the selected device} 47 48\item{\dots}{additional parameters to be passed to the plot} 49} 50\value{ 51if plot is TRUE, rocplot simply generates a plot. Otherwise, a list 52 with the following is produced: 53 \item{roc1}{a matrix containing a vector of x-coordinates and 54 y-coordinates corresponding to the number of ones and zeros correctly 55 predicted for the first model.} 56 \item{roc2}{a matrix containing a vector of x-coordinates and 57 y-coordinates corresponding to the number of ones and zeros correctly 58 predicted for the second model.} 59 \item{area1}{the area under the first ROC curve, calculated using 60 Reimann sums.} 61 \item{area2}{the area under the second ROC curve, calculated using 62 Reimann sums.} 63} 64\description{ 65The 'rocplot' command generates a receiver operator characteristic plot to 66compare the in-sample (default) or out-of-sample fit for two logit or probit 67regressions. 68} 69