invGauss

0th

Percentile

The inverse Gaussian and Wald distributions

Density, distribution function, quantile function, random generator and summary function for the inverse Gaussian and Wald distributions.

Keywords
distribution
Usage
dinvGauss(x, nu, lambda, log=FALSE)
pinvGauss(q, nu, lambda, lower.tail=TRUE, log.p=FALSE)
qinvGauss(p, nu, lambda, lower.tail=TRUE, log.p=FALSE)
rinvGauss(n, nu, lambda)
sinvGauss(nu, lambda)
Arguments
x,q
vector of non-negative quantities
p
vector of probabilities
n
vector of numbers of observations
nu
vector real and non-negative parameter -- the Wald distribution results when nu=1
lambda
vector real and non-negative parameter
log, log.p
logical vector; if TRUE, probabilities p are given as log(p)
lower.tail
logical vector; if TRUE (default), probabilities are $P[X <= x]$,="" otherwise,="" $p[x=""> x]$
Details

Probability functions:

$$f(x,\mu,\lambda)=\sqrt{\frac{\lambda}{2\pi x^3}}\exp\left[-\lambda\frac{(x-\mu^2}{2\mu^2 x}\right] \mbox{-- the density}$$

$$F(x,\mu,\lambda)=\Phi\left[\sqrt{\frac{\lambda}{x}}\left(\frac{x}{\mu}-1\right)\right]+e^{2\lambda/\mu}\Phi\left[\sqrt{\frac{\lambda}{x}}\left(\frac{x}{\mu}+1\right)\right] \mbox{-- the distribution function}$$

where $\Phi[]$ is the standard normal distribution function.

The calculations are accurate to at least seven significant figures over an extended range - much larger than that of any existing tables. We have tested them for $\lambda / \mu = 10e-20$, and $\lambda/\mu=10e4$. Accessible tables are those of Wassan and Roy (1969), which unfortunately, are sometimes good to only two significant digits. Much better tables are available in an expensive CRC Handbook (1989) � these tables are accurate to at least 7 significant digits for $\lambda/\mu \ge 0.02$ to $\lambda/\mu \le 4000$.

These are first passage time distributions of Brownian motion with positive drift. See Whitmore and Seshadri (1987) for a heuristic derivation. The Wald (1947) form represents the average sample number in sequential analysis. The distribution has a non-monotonic failure rate, and is of considerable interest in lifetime studies: Ckhhikara and Folks (1977). A general reference is Seshadri (1993).

This is an extremely difficult distribution to treat numerically, and it would not have been possible without some extraordinary contributions. An elegant derivation of the distribution function is to be found in Shuster (1968). The first such derivation seems to be that of Zigangirov (1962), which because of its inaccessibility, the author has not read. The method of generating random numbers is due to Michael, Schucany, and Haas (1976). The approximation of Whitmore and Yalovsky (1978) makes it possible to find starting values for inverting the distribution. All three papers are short, elegant, and non- trivial.

Value

  • The output values conform to the output from other such functions in R. dinvGauss() gives the density, pinvGauss() the distribution function and qinvGauss() its inverse. rinvGauss() generates random numbers. sinvGauss() produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis.

References

Ckhhikara, R.S. and Folks, J.L. (1977) The inverse Gaussian distribution as a lifetime model. Technometrics. 19-4. 461-468.

CRC Handbook. (1989). Percentile points of the inverse Gaussian distribution. J.A. Koziol (ed.) Boca Raton, FL.

Michael, J.R., Schucany, W.R. and Haas, R.W. (1976). Generating random variates using transformations with multiple roots. American Statistician. 30-2. 88-90.

Seshadri, V. (1993). The inverse Gaussian distribution. Clarendon, Oxford

Shuster, J. (1968). On the inverse Gaussian distribution function. Jour. Am. Stat. Assoc. 63. 1514-1516.

Wasan, M.T. and Roy, L.K. (1969). Tables of inverse Gaussian percentage points. Technometrics. 11-3. 591-604.

Wald, A. (1947). Sequential analysis. Wiley, NY

Whitmore, G.A. and Seshadri, V. (1987). A heuristic derivation of the inverse Gaussian distribution. American Statistician. 41-4. 280-281.

Whitmore, G.A. and Yalovsky, M. (1978). A normalizing logarithmic transformation for inverse Gaussian random variables. Technometrics. 20-2. 207-208.

Zigangirov, K.S. (1962). Expression for the Wald distribution in terms of normal distribution. Radiotech.Electron. 7. 164-166.

Aliases
  • inverse Gaussian
  • Wald distribution
  • dinvGauss
  • pinvGauss
  • qinvGauss
  • rinvGauss
  • sinvGauss
Examples
pinvGauss(1, 1, 16)
pinvGauss(c(.65,1,1.45), 1, 16) ## approximately 5\% 50\% and 95\%
pars<-sinvGauss(1, 16)
plot(function(x)dinvGauss(x,1, 16),pars$Mean-3*pars$SD,pars$Mean+3*pars$SD)
Documentation reproduced from package SuppDists, version 1.0-0, License: GPL vesion 2 or newer

Community examples

Looks like there are no examples yet.