# NOT RUN {
y <- rexp(23,1)
h <- 0.79 * IQR(y) * length(y) ^ (-1/5)
den <- LN(y,90,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")
# }
Run the code above in your browser using DataLab