Description Usage Arguments Details Value Author(s) References See Also Examples
Estimated Kernel density values by using Reciprocal Inverse Gaussian Kernel.
1 |
x |
scheme for generating grid points |
y |
a numeric vector of positive values. |
k |
gird points. |
h |
the bandwidth |
Scaillet 2003. proposed Reciprocal Inverse Gaussian kerenl. He claimed that his proposed kernel share the same properties as those of gamma kernel estimator.
K_{RIG ≤ft( \ln{ax}4\ln {(\frac{1}{h})} \right)}(y)=\frac{1}{√ {2π y}} exp≤ft[-\frac{x-h}{2h} ≤ft(\frac{y}{x-h}-2+\frac{x-h}{y}\right)\right]
x |
grid points |
y |
estimated values of density |
Javaria Ahmad Khan, Atif Akbar.
Scaillet, O. 2004. Density estimation using inverse and reciprocal inverse Gaussian kernels. Nonparametric Statistics, 16, 217-226.
To examine RIG density plot see plot.RIG
and for Mean Squared Error mse
. Similarly, for Laplace kernel Laplace
.
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 | #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 <- RIG(x = xx, y = y, k = 200, h = h)
##If scheme for generating gridpoints is unknown
y <- rexp(50, 1)
h <- 3
den <- RIG(y = y, k = 90, h = h)
## Not run:
##If user do not mention the number of grid points
y <- rexp(23, 1)
xx <- seq(min(y) + 0.05, max(y), length = 90)
#any bandwidth can be used
require(KernSmooth)
h <- dpik(y)
den <- RIG(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 <- RIG(x = xx, y = y, k = 90)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.