CV | R Documentation |
This function computes the data-driven bandwidth for smoothing the ROC (or distribution) function using the CV method of Beyene and El Ghouch (2020). This is an extension of the classical (unweighted) cross-validation bandwith selection method to the case of weighted data.
CV(X, wt, ktype = "normal")
X |
The numeric data vector. |
wt |
The non-negative weight vector. |
ktype |
A character string giving the type kernel to be used: " |
Bowman et al (1998) proposed the cross-validation bandwidth selection method for unweighted kernal smoothed distribution function. This method is implemented in the R
package kerdiest
.
We adapted this for the case of weighted data by incorporating the weight variable into the cross-validation function of Bowman's method. See Beyene and El Ghouch (2020) for details.
Returns the computed value for the bandwith parameter.
Kassu Mehari Beyene and Anouar El Ghouch
Beyene, K. M. and El Ghouch A. (2020). Smoothed time-dependent receiver operating characteristic curve for right censored survival data. Statistics in Medicine. 39: 3373– 3396.
Bowman A., Hall P. and Trvan T.(1998). Bandwidth selection for the smoothing of distribution functions. Biometrika 85:799-808.
Quintela-del-Rio, A. and Estevez-Perez, G. (2015). kerdiest:
Nonparametric kernel estimation of the distribution function, bandwidth selection and estimation of related functions. R
package version 1.2.
library(cenROC)
X <- rnorm(100) # random data vector
wt <- runif(100) # weight vector
## Cross-validation bandwidth selection
CV(X = X, wt = wt)$bw
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.