kroc(x1, x2, H1, h1, hy, gridsize, gridtype, xmin, xmax, supp=3.7, eval.points,
binned=FALSE, bgridsize, positive=FALSE, adj.positive, w, verbose=FALSE)## S3 method for class 'kroc':
predict(object, ..., x)
## S3 method for class 'kroc':
summary(object, ...)
Hpi.kcde, hpi.kcde is called by default.kroc, output from krockroc which is a list
with fields:x1, x2 - same as inputeval.pointsx1 should
be larger in general that those in the second sample x2. The
usual method for computing 1-d ROC curves is not valid for
multivariate data. Duong (2014),
based on Lloyd (1998), develops an alternative formulation
$(F_{Y_1}(z), F_{Y_2}(z))$ based on the
cumulative distribution functions of $Y_j = \bar{F}_1(\bold{X}_j), j=1,2$. If the bandwidth H1 is missing from kroc, then
the default bandwidth is the plug-in selector
Hpi.kcde. Likewise for missing h1,hy. A bandwidth matrix
H1 is required for x1 for d>1, but the second bandwidth hy is always a scalar since $Y_j$ are 1-d variables.
The effective support, binning, grid size, grid range, positive data
parameters are the same as for kde.
--The summary method for kroc objects prints out the
summary indices of the ROC curve, as contained in the indices
field, namely the AUC (area under the curve) and Youden index.
Lloyd, C. (1998) Using smoothed receiver operating curves to summarize and compare diagnostic systems. Journal of the American Statistical Association. 93, 1356-1364.
kcdesamp <- 1000
x <- rnorm.mixt(n=samp, mus=0, sigmas=1, props=1)
y <- rnorm.mixt(n=samp, mus=0.5, sigmas=1, props=1)
Rhat <- kroc(x1=x, x2=y)
summary(Rhat)
predict(Rhat, x=0.5)Run the code above in your browser using DataLab