Density, distribution function, quantile function, and random generation for the exponentially modified Gaussian distribution.
dexgauss(x, mu = 0, sigma = 1, lambda = 1, log = FALSE)pexgauss(q, mu = 0, sigma = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE)
qexgauss(p, mu = 0, sigma = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE)
rexgauss(n, mu = 0, sigma = 1, lambda = 1)
dexgauss gives the density, pexgauss gives the distribution function, qexgauss gives the quantile function, and rexgauss generates random deviates.
vector of quantiles
mean parameter of the Gaussian part
standard deviation parameter of the Gaussian part, must be positive.
rate parameter of the exponential part, must be positive.
logical; if TRUE, probabilities/ densities \(p\) are returned as \(\log(p)\).
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 dexgauss and pexgauss allows for automatic differentiation with RTMB.
qexgauss and rexgauss are reparameterised imports from gamlss.dist::exGAUS.
If \(X \sim N(\mu, \sigma^2)\) and \(Y \sim \text{Exp}(\lambda)\), then \(Z = X + Y\) follows the exponentially modified Gaussian distribution with parameters \(\mu\), \(\sigma\), and \(\lambda\).
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC, doi:10.1201/9780429298547. An older version can be found in https://www.gamlss.com/.
x <- rexgauss(1, 1, 2, 2)
d <- dexgauss(x, 1, 2, 2)
p <- pexgauss(x, 1, 2, 2)
q <- qexgauss(p, 1, 2, 2)
Run the code above in your browser using DataLab