Learn R Programming

frailtyROC (version 1.0.0)

wbw: Function to select the bandwidth parameter needed for smoothing the time-dependent ROC curve.

Description

This function computes a data-driven bandwidth for smoothing the ROC curve, supporting three methods: the normal reference method, the plug-in method, and the cross-validation method introduced in Beyene and El Ghouch (2020). It is particularly important for estimating the bandwidth in the presence of weighted data.

Usage

wbw(X, wt, bw = "NR", ktype = "normal")

Value

Returns the estimated value for the bandwidth parameter.

Arguments

X

numeric data vector.

wt

non-negative weight vector.

bw

a character string specifying the bandwidth selection method. The possible options are "NR" for the normal reference, the plug-in "PI" and cross-validation "CV".

ktype

a character string indicating the type of kernel function: "normal", "epanechnikov", "biweight", or "triweight". Default is "normal" kernel.

References

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.

Examples

Run this code
library(frailtyROC)

X <- rnorm(100) # random data vector
wt <- runif(100) # weight vector

# Normal reference bandwidth selection

wbw(X = X, wt = wt)$bw

Run the code above in your browser using DataLab