powered by
Density, distribution function, quantile function, and random generation for the Laplace distribution.
dlaplace(x, mu = 0, b = 1, log = FALSE)plaplace(q, mu = 0, b = 1, lower.tail = TRUE, log.p = FALSE)qlaplace(p, mu = 0, b = 1, lower.tail = TRUE, log.p = FALSE)rlaplace(n, mu = 0, b = 1)
plaplace(q, mu = 0, b = 1, lower.tail = TRUE, log.p = FALSE)
qlaplace(p, mu = 0, b = 1, lower.tail = TRUE, log.p = FALSE)
rlaplace(n, mu = 0, b = 1)
dlaplace gives the density, plaplace gives the distribution function, qlaplace gives the quantile function, and rlaplace generates random deviates.
dlaplace
plaplace
qlaplace
rlaplace
vector of quantiles
location parameter
scale parameter, must be positive.
logical; if TRUE, probabilities/ densities \(p\) are returned as \(\log(p)\).
TRUE
logical; if TRUE, probabilities are \(P[X \le x]\), otherwise, \(P[X > x]\).
vector of probabilities
number of random values to return
This implementation of dlaplace allows for automatic differentiation with RTMB.
RTMB
x <- rlaplace(1, 1, 1) d <- dlaplace(x, 1, 1) p <- plaplace(x, 1, 1) q <- qlaplace(p, 1, 1)
Run the code above in your browser using DataLab