The 'rocplot' command generates a receiver operator characteristic plot to compare the in-sample (default) or out-of-sample fit for two logit or probit regressions.
rocplot(z1, z2,
cutoff = seq(from=0, to=1, length=100), lty1="solid",
lty2="dashed", lwd1=par("lwd"), lwd2=par("lwd"),
col1=par("col"), col2=par("col"),
main="ROC Curve",
xlab = "Proportion of 1's Correctly Predicted",
ylab="Proportion of 0's Correctly Predicted",
plot = TRUE,
...
)
first model
second model
A vector of cut-off values between 0 and 1, at which to evaluate the proportion of 0s and 1s correctly predicted by the first and second model. By default, this is 100 increments between 0 and 1 inclusive
the line type of the first model (defaults to 'line')
the line type of the second model (defaults to 'dashed')
the line width of the first model (defaults to 1)
the line width of the second model (defaults to 1)
the color of the first model (defaults to 'black')
the color of the second model (defaults to 'black')
a title for the plot (defaults to "ROC Curve")
a label for the X-axis
a lavel for the Y-axis
whether to generate a plot to the selected device
additional parameters to be passed to the plot
if plot is TRUE, rocplot simply generates a plot. Otherwise, a list with the following is produced:
a matrix containing a vector of x-coordinates and y-coordinates corresponding to the number of ones and zeros correctly predicted for the first model.
a matrix containing a vector of x-coordinates and y-coordinates corresponding to the number of ones and zeros correctly predicted for the second model.
the area under the first ROC curve, calculated using Reimann sums.
the area under the second ROC curve, calculated using Reimann sums.