Description Usage Arguments Details Value Author(s) References See Also Examples
Estimated Kernel density values by using Laplace Kernel.
1 |
x |
scheme for generating grid points |
y |
a numeric vector of positive values. |
k |
gird points. |
h |
the bandwidth |
Laplace kernel is developed by Khan and Akbar. Kernel is developed by using Chen's idea. Laplace kernel is;
K_{Laplace≤ft(x,h^{\frac{1}{2}}\right)} (u)=\frac{1}{2√ h}exp ≤ft(-\frac{|{u-x}|}{√ h}\right)
x |
grid points |
y |
estimated values of density |
Javaria Ahmad Khan, Atif Akbar.
Khan, J. A.; Akbar, A. Density Estimation by Laplace Kernel. Working paper, Department of Statistics, Bahauddin Zakariya University, Multan, Pakistan.
To examine Laplace density plot see plot.Laplace
and for Mean Squared Error mse
. Similarly, for RIG kernel RIG
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.