### Density plot ###
curve(dleeg(x, 0.15, 1), col = 2)
curve(dleeg(x, 0.12, 1.5), col = 3, add = TRUE)
curve(dleeg(x, 0.45, 4), col = 4, add = TRUE)
curve(dleeg(x, 0.5, 1), col = 1, add = TRUE)
curve(dleeg(x, 0.85, 15), col = 5, add = TRUE)
curve(dleeg(x, 0.9, 15), col = 6, add = TRUE)
curve(dleeg(x, 0.86, 1.25), col = 7, add = TRUE)
### Distribution function ###
curve(pleeg(x, 0.15, 1), col = 2, xlim = c(-2, 2))
curve(pleeg(x, 0.15, 5), col = 3, add = TRUE)
curve(pleeg(x, 0.15, 10), col = 4, add = TRUE)
### Quantile function ###
qleeg(pleeg(0.2, 0.15, 2), 0.15, 2)
pleeg(qleeg(0.2, 0.15, 2), 0.15, 2)
### Random generation ###
# Scenario
n <- 500; mu <- 0.3; delta <- 3
# Monte Carlo simulation
M <- vector();
prop <- matrix(NA, 1000, 5)
for(i in 1:1000){
y <- rleeg(n, mu, delta)
M[i] <- median(y)
}
data.frame(Statistic = c("Median"),
True = c(mu),
Mean = c(mean(M)),
Sd = c(sd(M)),
Bias = c(mean(M) - mu))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.