| exgauss | R Documentation |
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)
x, q |
vector of quantiles |
mu |
mean parameter of the Gaussian part |
sigma |
standard deviation parameter of the Gaussian part, must be positive. |
lambda |
rate parameter of the exponential part, must be positive. |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
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.
dexgauss gives the density, pexgauss gives the distribution function, qexgauss gives the quantile function, and rexgauss generates random deviates.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.