Skip to contents

Equation (2.2): smooth with W = int K rather than with K. The bias therefore carries f', one derivative lower than the density estimator's f'', and the estimate is continuous where the empirical df jumps.

Usage

morie_fauzi_kdfe(x, grid = NULL, h = NULL)

Arguments

x

numeric sample.

grid

evaluation points; data-driven if NULL.

h

bandwidth; 4^(1/3) sigma n^{-1/3} if NULL.

Value

list: grid, F_hat, F_empirical, bandwidth, bandwidth_rate, monotone, bias_term, uses_integrated_kernel, why_over_edf, n, method.

Details

The default bandwidth is sd(x) * n^{-1/3}, NOT the n^{-1/5} density rule. Sec. 5.3.2 of the book is explicit that Azzalini (1981) recommended c n^{-1/3} for distribution-function estimation, and the book's own simulations use it. Under the density rule this estimator oversmooths badly enough to lose, in mean squared error, to the step function it exists to improve on.

References

Fauzi and Maesono (2023), Eq. (2.2) and Sec. 5.3.2; Nadaraya (1964); Azzalini, A. (1981), "A note on the estimation of a distribution function and quantiles by a kernel method", Biometrika 68:326-328 (reference [9] of the book).

Examples

set.seed(1)
morie_fauzi_kdfe(stats::rexp(200), grid = c(0.5, 1))$F_hat
#> [1] 0.3342371 0.5973254