Density, distribution function, quantile function and random generation for
the Unit Inverse Gaussian distribution mean
and scale
.
Usage
duigd(x, mu, lambda = 1, log = FALSE)
puigd(q, mu, lambda = 1, lower.tail = TRUE, log.p = FALSE)
quigd(p, mu, lambda = 1, lower.tail = TRUE)
ruigd(n, mu, lambda = 1)
Arguments
- x, q
vector of quantiles.
- mu
a mean parameter.
- lambda
a scale parameter.
- log, log.p
logical; if TRUE, probabilities p are given as log(p).
- lower.tail
logical; if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).
- p
vector of probabilities.
- n
number of observations. If
length(n) > 1
, the length is taken to be the number required.
Value
duigd
gives the density, puigd
gives the distribution
function, quigd
gives the quantile function and ruigd
generates
random deviates.
Details
The Unit Inverse Gaussian distribution scale
parameter \(\lambda\) and mean
parameter \(\mu\), has density
$$f\left( x\right) =\sqrt{\frac{\lambda }{2\pi }}
\frac{1}{x^{3/2}}e^{-\frac{ \lambda }{2\mu ^{2}x}\left( x-\mu \right) ^{2}},$$
where
$$x>0,~\mu ,\lambda >0.$$