Learn R Programming

bbemkr (version 1.3)

GasserMullerkernel: Gasser-Muller kernel estimator

Description

Computes the Gasser-Muller kernel estimator

Usage

GasserMullerkernel(gridpoint, x, y, h)

Arguments

gridpoint
One gridpoint within the range of x variables. A set of gridpoints can be achieved by looping this function.
x
A set of x observations.
y
A set of y observations.
h
Optimal bandwidth chosen by the user.

Value

  • Density value

Details

$\frac{1}{h}\sum^n_{i=1}[\int^{s_i}_{s_{i-1}}K(\frac{x-u}{h})du]y_i$, where $s_i=\frac{x_{i-1}+x_i}{2}$.

References

T. Gasser, H-G. Muller and V. Mammitzsch (1985), Kernels for nonparametric curve estimation, Journal of the Royal Statistical Society (Series B), 47(2), 238-252. Q. Li and J. S. Racine (2007), Nonparametric econometrics: Theory and Practice. Princeton University Press. J. S. Simonoff (1996), Smoothing methods in Statistics, Springer.

See Also

NadarayaWatsonkernel, PriestleyChaokernel

Examples

Run this code
x = sort(rnorm(100))
y = seq(1, 100, length.out = 100)
gridpoint = 1
GasserMullerkernel(gridpoint, x, y, h = 0.3)

Run the code above in your browser using DataLab