PI | R Documentation |

This function computes the data-driven bandwidth for smoothing the ROC (or distribution) function using the PI method of Beyene and El Ghouch (2020). This is an extension of the classical (unweighted) direct plug-in bandwith selection method to the case of weighted data.

```
PI(X, wt, ktype = "normal")
```

`X` |
The numeric vector of random variable. |

`wt` |
The non-negative weight vector. |

`ktype` |
A character string giving the type kernel to be used: " |

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.

```
library(cenROC)
X <- rnorm(100) # random data vector
wt <- runif(100) # weight vector
## Plug-in bandwidth selection
PI(X = X, wt = wt)$bw
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.