# NOT RUN {
x <- seq(-5, 5, by = 0.01)
loc <- 0; sigma <- 1.5; kappa <- 2
# }
# NOT RUN {
plot(x, dalap(x, loc, sigma, kappa = kappa), type = "l",
main = "Blue is density, orange is cumulative distr. function",
ylim = c(0, 1), sub = "Purple are 5, 10, ..., 95 percentiles",
las = 1, ylab = "", cex.main = 0.5, col = "blue")
abline(h = 0, col = "blue", lty = 2)
lines(qalap(seq(0.05, 0.95, by = 0.05), loc, sigma, kappa = kappa),
dalap(qalap(seq(0.05, 0.95, by = 0.05), loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa), col="purple", lty=3, type = "h")
lines(x, palap(x, loc, sigma, kappa = kappa), type = "l", col = "orange")
abline(h = 0, lty = 2)
# }
# NOT RUN {
pp <- seq(0.05, 0.95, by = 0.05) # Test two functions
max(abs(palap(qalap(pp, loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa) - pp)) # Should be 0
# }
Run the code above in your browser using DataLab