Learn R Programming

asymmetry.measures (version 0.2)

IntKde: Integrated Kernel density estimator

Description

Classical univariate integrated kernel density estimator

Usage

IntKde(xin, xout, h, kfun)

Arguments

xin

A vector of data points - the available sample size.

xout

grid points where the distribution function will be estimated.

h

The bandwidth parameter. Defaults to \(3.572*\sigma*n^{-1/3}\) according to Bowman et al.(1998).

kfun

The kernel to use in the distribution function estimate.

Value

Returns a vector with the estimate of the distribution function at the user specified grid points.

Details

It implements the classical density integrated kernel estimator.

Let \(X_1,X_2,\dots, X_n\) be a univariate independent and identically distributed sample drawn from some unknown distribution function \(F\). Its kernel density estimator is

$$\hat{F}(x)= n^{-1}\sum_{i=1}^n K\left \{ (x-X_i)h^{-1}\right \}$$

where \(K\) is an integrated kernel, and \(h > 0\) is a smoothing parameter called the bandwidth.

References

Bowman, A., Hall, P., and Prvan, T., (1998), Bandwidth Selection for the Smoothing of Distribution Functions, Biometrika, 799-808.

See Also

bw.nrd, bw.nrd0, bw.ucv, bw.bcv

Examples

Run this code
# NOT RUN {
x.in <- rnorm(100)
x.out <- seq(-3.4,3.4,length=60)
kernel <- IntEpanechnikov
dist.est <- IntKde(xin=x.in,xout=x.out,kfun=kernel)
plot(x.out,dist.est, type="l", col="red", main="Kernel c.d.f. estimator")
# }

Run the code above in your browser using DataLab