Description Usage Arguments Value Author(s) References See Also Examples
Plot density by using Laplace Kernel.
1 2 |
x |
an object of class "Laplace" |
... |
Not presently used in this implementation |
nothing
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 estimated values for density see Laplace
and for Mean Squared Error mse
. Similarly, for plot of Laplace kernel plot.RIG
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | y <- rexp(100, 1)
h <- 0.79 * IQR(y) * length(y) ^ (-1/5)
xx <- seq(min(y) + 0.05, max(y), length = 100)
den <- Laplace(x = xx, y = y, k = 100, h = h)
plot(den, type = "l")
##other details can also be added
y <- rexp(100, 1)
h <- 0.79 * IQR(y) * length(y) ^ (-1/5)
den <- Laplace(x = xx, y = y, k = 100, h = h)
plot(den, type = "s", ylab = "Density Function", lty = 1, xlab = "Time")
## To add true density along with estimated
d1 <- density(y, bw = h)
lines(d1, type = "p", col = "red")
legend("topright", c("Real Density", "Density by RIG Kernel"),
col = c("red", "black"), lty = c(1, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.