PRDenEstC: Parzen-Rosenblatt denstiy estimator.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/locpol.R

Description

Parzen–Rosenblat univariate density estimator.

Usage

1
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 definition.

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

1
2
3
4
5
6
	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)

locpol documentation built on May 29, 2017, 11:33 p.m.

Related to PRDenEstC in locpol...