test
, for prediction of stat
. Alternatively a
model formula may given, in which case the the linear predictor is the
test variable and the response is taken as the true status variable.
Plots curves of these and a ROC-curve.ROC( test = NULL,
stat = NULL,
form = NULL,
plot = c("sp", "ROC"),
PS = is.null(test),
PV = TRUE,
MX = TRUE,
MI = TRUE,
AUC = TRUE,
grid = seq(0,100,10),
col.grid = gray( 0.9 ),
cuts = NULL,
lwd = 2,
data = parent.frame(),
... )
test
and stat
are ignored. If not given then
both test
and stat
must be supplied.stat
==TRUE, otherwise it is the scale of test
if this
is given otherwise the scale of the linear predictor from the
logistic rgrid
percent.plot
plot
.x <- rnorm( 100 )
z <- rnorm( 100 )
w <- rnorm( 100 )
tigol <- function( x ) 1 - ( 1 + exp( x ) )^(-1)
y <- rbinom( 100, 1, tigol( 0.3 + 3*x + 5*z + 7*w ) )
ROC( form = y ~ x + z, plot="ROC" )
Run the code above in your browser using DataLab