plot.RIG: Density Plot by Reciprocal Inverse Gaussian kernel In AsyK: Kernel Density Estimation

Description

Plot density by using Reciprocal Inverse Gaussian Kernel.

Usage

 ```1 2``` ```## S3 method for class 'RIG' plot(x, ...) ```

Arguments

 `x` an object of class "RIG" `...` Not presently used in this implementation

nothing

References

Scaillet, O. 2004. Density estimation using inverse and reciprocal inverse Gaussian kernels. Nonparametric Statistics, 16, 217-226.

To examine RIG estimated values for density see `RIG` and for Mean Squared Error `mse`. Similarly, for plot of Laplace kernel `plot.Laplace`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```y <- rexp(200, 1) h <- 0.79 * IQR(y) * length(y) ^ (-1/5) xx <- seq(min(y) + 0.05, max(y), length = 200) den <- RIG(x = xx, y = y, k = 200, h = h) plot(den, type = "l") ##other details can also be added y <- rexp(200, 1) h <- 0.79 * IQR(y) * length(y) ^ (-1/5) den <- RIG(x = xx, y = y, k = 200, 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)) ```