mu
and
sigma
are the mean and standard deviation from the normal distribution variable while the parameter nu
is the mean of the exponential variable.
The functions dexGAUS
, pexGAUS
, qexGAUS
and rexGAUS
define the density, distribution function,
quantile function and random generation for the ex-Gaussian distribution.exGAUS(mu.link = "identity", sigma.link = "log", nu.link = "log")
dexGAUS(y, mu = 5, sigma = 1, nu = 1, log = FALSE)
pexGAUS(q, mu = 5, sigma = 1, nu = 1, lower.tail = TRUE, log.p = FALSE)
qexGAUS(p, mu = 5, sigma = 1, nu = 1, lower.tail = TRUE, log.p = FALSE,
lower.limit = mu - 10 * sqrt(sigma^2 + nu^2),
upper.limit = mu + 10 * sqrt(sigma^2 + nu^2))
rexGAUS(n, mu = 5, sigma = 1, nu = 1, ...)
mu.link
, with "identity" link as the default for the mu
parameter.
Other links are "$1/mu^2$" and "log"sigma.link
, with "log" link as the default for the sigma
parameter.
Other links are "inverse" and "identity"nu.link
, with "log" link as the default for the nu
parameter.
Other links are "inverse", "identity" and "logshifted" (shifted from one)mu
parameter valuesnu
parameter valueslength(n) > 1
, the length is
taken to be the number requiredlower.limit
is the lowest limmit of the searchexGAUS()
returns a gamlss.family
object which can be used to fit ex-Gaussian distribution in the gamlss()
function.
dexGAUS()
gives the density, pexGAUS()
gives the distribution function,
qexGAUS()
gives the quantile function, and rexGAUS()
generates random deviates.exGAUS
), is defined as
$$f(y|\mu,\sigma,\nu)=\frac{1}{\nu} e^{\frac{\mu-y}{\nu}+\frac{\sigma^2}{2 \nu^2}} \Phi(\frac{y-\mu}{\sigma}-\frac{\sigma}{\nu})$$
where $\Phi$ is the cdf of the standard normal distribution,
for $-\inftygamlss
, gamlss.family
, BCCG
, GA
, IG
LNO
y<- rexGAUS(100, mu=300, nu=100, sigma=35)
hist(y)
m1<-gamlss(y~1, family=exGAUS)
plot(m1)
curve(dexGAUS(y=x, mu=300 ,sigma=35,nu=100), 100, 600,
main = "The ex-GAUS density mu=300 ,sigma=35,nu=100")
plot(function(x) pexGAUS(x, mu=300,sigma=35,nu=100), 100, 600,
main = "The ex-GAUS cdf mu=300, sigma=35, nu=100")
Run the code above in your browser using DataLab