Skip to contents

The gamma kernel's support IS [0, Inf), so no mass ever lands on the negative half-line and the boundary bias simply does not arise: the estimator is consistent at zero, where a Gaussian-kernel estimate is not. modified = TRUE applies Fauzi's self-elimination correction, which cancels the leading bias term.

Usage

morie_fauzi_gamma_kde(x, grid = NULL, h = NULL, modified = FALSE, a = 2)

Arguments

x

non-negative numeric sample.

grid

evaluation points in [0, Inf); data-driven if NULL.

h

bandwidth; sd(x) * n^{-2/5} if NULL.

modified

apply the self-elimination correction.

a

the correction's second-bandwidth multiplier, not 1.

Value

list: grid, density, bandwidth, modified, a, boundary_consistent (TRUE), bias_order, mass, why_it_works, n, method.

References

Fauzi and Maesono (2023), Ch. 1; Chen (1999).

Examples

set.seed(1)
morie_fauzi_gamma_kde(stats::rexp(200), grid = c(0, 1), h = 0.1)$density
#> [1] 0.6273707 0.4098218