PRDenEstC {locpol}R Documentation

Parzen–Rosenblatt denstiy estimator.

Description

Parzen–Rosenblat univariate density estimator.

Usage

PRDenEstC(x, xeval, bw, kernel, weig = rep(1, length(x)))

Arguments

x vector with data points.
xeval Vector of evaluation points.
bw Smoothing parameter, bandwidth.
kernel Kernel used to perform the estimation, see Kernels
weig Vector of weights for observations.

Details

Simple Parzen–Rosenblat univariate density estimation, computed using definintion.

Value

Returns an (x,den) data frame.

x Evaluation points.
den Density at each x point.

Author(s)

Jorge Luis Ojeda Cabrera.

References

Fan, J. and Gijbels, I. Local polynomial modelling and its applications/. Chapman & Hall, London (1996).

Wand, M.~P. and Jones, M.~C. Kernel smoothing/. Chapman and Hall Ltd., London (1995).

See Also

density, that uses FT to compute a kernel density estimator, bkde from package KernSmooth for a binned version, and bw.nrd0, dpik, denCVBwSelC for bandwidth selection.

Examples

        N <- 100
        x <-  runif(N)
        xeval <- 0:10/10
        b0.125 <- PRDenEstC(x, xeval, 0.125, EpaK)
        b0.05 <- PRDenEstC(x, xeval, 0.05, EpaK)
        cbind(x = xeval, fx = 1, b0.125 = b0.125$den, b0.05 = b0.05$den)

[Package locpol version 0.2-0 Index]