smooth3 | R Documentation |
This function computes the smoothed Indicator function I[x < y] using a 3rd order polynomial.
If |x-y| > eps then the result is the same as the indicator function I[x < y] (either 0 or 1). For |x-y| < eps, it is a 3rd order polynomial.
eps
is a scalar, must > 0. It is the smoothing window width.
smooth3(x, y, eps=0.05)
x |
a vector of observations, length m, for the first sample. |
y |
a vector of observations, length n, for the second sample. |
eps |
The smoothing window width, must >0. |
This function is used in many places to replace an indicator function I[x<y]
.
For example, when estimating the AUC.
It is listed here because users may find it useful elsewhere.
smooth3( )
returns a matrix of dimension ncol=length(y)
, nrow=length(x)
. The entry
of the matrix are smoothed values of I[x[i] < y[j]].
Mai Zhou <maizhou@gmail.com>.
Zhao, Y., Ding, X. and Zhou (2021). Confidence Intervals of AUC and pAUC by Empirical Likelihood. Tech Report. https://www.ms.uky.edu/~mai/research/eAUC1.pdf
y <- c(10, 209, 273, 279, 324, 391, 566, 785)
x <- c(21, 38, 39, 51, 77, 185, 240, 289, 524)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.