Laplace {AsyK}R Documentation

Estimate Density Values by Laplace kernel

Description

Estimated Kernel density values by using Laplace Kernel.

Usage

Laplace(x = NULL, y, k = NULL, h = NULL)

Arguments

x

scheme for generating grid points

y

a numeric vector of positive values.

k

gird points.

h

the bandwidth

Details

Laplace kernel is developed by Khan and Akbar. Kernel is developed by using Chen's idea. Laplace kernel is;

K_{Laplace\left(x,h^{\frac{1}{2}}\right)} (u)=\frac{1}{2\sqrt h}exp \left(-\frac{|{u-x}|}{\sqrt h}\right)

Value

x

grid points

y

estimated values of density

Author(s)

Javaria Ahmad Khan, Atif Akbar.

References

Khan, J. A.; Akbar, A. Density Estimation by Laplace Kernel. Working paper, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan.

See Also

To examine Laplace density plot see plot.Laplace and for Mean Squared Error mse. Similarly, for RIG kernel RIG.

Examples

#Data can be simulated or real data
## Number of grid points "k" should be at least equal to the data size.
### If user define the generating scheme of gridpoints than number of gridpoints should
####be equal or greater than "k"
###### otherwise NA will be produced.
y <- rexp(100, 1)
xx <- seq(min(y) + 0.05, max(y), length = 100)
h <- 2
den <- Laplace(x = xx, y = y, k = 200, h = h)

##If scheme for generating gridpoints is unknown
y <- rexp(50, 1)
h <- 3
den <- Laplace(y = y, k = 90, h = h)

##If user do not mention the number of grid points
y <- rexp(23, 1)
xx <- seq(min(y) + 0.05, max(y), length = 90)

## Not run: 
#any bandwidth can be used
require(KernSmooth)
h <- dpik(y)
den <- Laplace(x = xx, y = y, h = h)

## End(Not run)

#if bandwidth is missing
y <- rexp(100, 1)
xx <- seq(min(y) + 0.05, max(y), length = 100)
den <- Laplace(x = xx, y = y, k = 90)

[Package AsyK version 1.5.5 Index]