Learn R Programming

bbemkr (version 1.3)

PriestleyChaokernel: Priestley-Chao kernel estimator

Description

Computes Priestley-Chao kernel estimator

Usage

PriestleyChaokernel(x, y, h, gridpoint)

Arguments

x
A set of x observations.
y
A set of y observations.
h
Optimal bandwidth chosen by the user.
gridpoint
A set of gridpoints.

Value

  • gridpointA set of gridpoints.
  • mhDensity values corresponding to the set of gridpoints.

Details

$\frac{1}{h}\sum^n_{i=1}(x_i-x_{i-1})K(\frac{x-x_i}{h})y_i$

References

M. B. Priestley and M. T. Chao (1972) Nonparametric function fitting, Journal of Royal Statistical Society (Series B), 34(3), 385-392.

See Also

GasserMullerkernel, NadarayaWatsonkernel

Examples

Run this code
x = rnorm(100)
y = rnorm(100)
PriestleyChaokernel(x, y, h = 2, gridpoint = seq(-3,3,length.out=100))

Run the code above in your browser using DataLab