Skip to contents

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.$$

References

Ghitany, M., Mazucheli, J., Menezes, A. ve Alqallaf, F., 2019, The unit-inverse Gaussian distribution: A new alternative to two-parameter distributions on the unit interval, Communications in Statistics-Theory and Methods, 48 (14), 3423-3438.

Examples

library(new.dist)
duigd(1, mu=2, lambda=3)
#> [1] 0.4749088
puigd(1,mu=2,lambda=3)
#> [1] 0.2873867
quigd(.1,mu=2,lambda=3)
#> [1] 0.6104128
ruigd(10,mu=2,lambda=3)
#>  [1] 1.1163040 2.8620361 2.3710936 3.2464119 2.2886982 1.7040552 1.4119938
#>  [8] 0.5136701 1.2424166 3.5355316