# Inv.gaussian: The Inverse Gaussian Distribution In VGAM: Vector Generalized Linear and Additive Models

## Description

Density, distribution function and random generation for the inverse Gaussian distribution.

## Usage

 ```1 2 3``` ```dinv.gaussian(x, mu, lambda, log = FALSE) pinv.gaussian(q, mu, lambda) rinv.gaussian(n, mu, lambda) ```

## Arguments

 `x, q` vector of quantiles.
 `n` number of observations. If `length(n) > 1` then the length is taken to be the number required. `mu` the mean parameter. `lambda` the lambda parameter. `log` Logical. If `log = TRUE` then the logarithm of the density is returned.

## Details

See `inv.gaussianff`, the VGAM family function for estimating both parameters by maximum likelihood estimation, for the formula of the probability density function.

## Value

`dinv.gaussian` gives the density, `pinv.gaussian` gives the distribution function, and `rinv.gaussian` generates random deviates.

## Note

Currently `qinv.gaussian` is unavailable.

T. W. Yee

## References

Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1994). Continuous Univariate Distributions, 2nd edition, Volume 1, New York: Wiley.

Taraldsen, G. and Lindqvist, B. H. (2005). The multiple roots simulation algorithm, the inverse Gaussian distribution, and the sufficient conditional Monte Carlo method. Preprint Statistics No. 4/2005, Norwegian University of Science and Technology, Trondheim, Norway.

`inv.gaussianff`, `waldff`.
 ```1 2 3 4 5 6 7``` ```## Not run: x <- seq(-0.05, 4, len = 300) plot(x, dinv.gaussian(x, mu = 1, lambda = 1), type = "l", col = "blue",las = 1, main = "blue is density, orange is cumulative distribution function") abline(h = 0, col = "gray", lty = 2) lines(x, pinv.gaussian(x, mu = 1, lambda = 1), type = "l", col = "orange") ## End(Not run) ```