smooth3: Smoothed indicator function I[x < y], which is the integration of the Epanechnikov kernal.
Description
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.
Usage
smooth3(x, y, eps=0.05)
Value
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]].
Arguments
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.
Author
Mai Zhou <maizhou@gmail.com>.
Details
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.
References
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