/
Home |

S-Archive | Download Script |

invgauss |
Inverse Gaussian Distribution |

**DESCRIPTION**- Density, cumulative probability, quantiles and random generation for the inverse Gaussian distribution.
**USAGE**`dinvgauss(x, mu, lambda=1)`

pinvgauss(q, mu, lambda=1)

qinvgauss(p, mu, lambda=1)

rinvgauss(n, mu, lambda=1)

**REQUIRED ARGUMENTS**`x`vector of quantiles. Missing values (NAs) are allowed. `q`vector of quantiles. Missing values (NAs) are allowed. `p`vector of probabilities. Missing values (NAs) are allowed. `n`sample size. If length(n) is larger than 1, then length(n) random values are returned. `mu`vector of (positive) means. This is replicated to be the same length as p or q or the number of deviates generated. **OPTIONAL ARGUMENTS**`lambda`vector of (positive) precision parameters. This is replicated to be the same length as p or q or the number of deviates generated. The variance of the distribution is mu ^{3}/lambda.**VALUE**- Vector of same length as
`x`or`q`giving the density (`dinvgauss`), probability (`pinvgauss`), quantile (`qinvgauss`) or random sample (`rinvgauss`) for the inverse Gaussian distribution with mean`mu`and inverse dispersion`lambda`. Elements of`q`or`p`that are missing will cause the corresponding elements of the result to be missing. **SIDE EFFECTS**- The function
`rinvgauss`causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated. **BACKGROUND**- The inverse Gaussian distribution takes values on the positive real line. Applications of the inverse Gaussian include sequential analysis, diffusion processes and radiotechniques. The inverse Gaussian is one of the response distributions used in generalized linear models.
**REFERENCES**- Chhikara, R. S., and Folks, J. Leroy, (1989).
*The inverse Gaussian distribution: Theory, methodology, and applications.*Marcel Dekker, New York. - Giner, G, and Smyth, GK (2016). statmod: Probability Calculations for the Inverse Gaussian Distribution. [arXiv:1603.06687]
**ACKNOWLEDGEMENT**- The function
`qinvgauss`was contributed by Dr Paul Bagshaw of the Centre National d'Etudes des Telecommunications (DIH/DIPS), France. **SEE ALSO**`qres`.

Note that more developed inverse Gaussian functions, with improved accuracy, are now available in the statmod package for R.**EXAMPLES**`y <- rinvgauss(20,1,2) # generate vector of 20 random numbers`

p <- pinvgauss(y,1,2) # p should be uniform

S-Archive | Download Script |

Gordon Smyth.
Copyright © 1996-2016. *Last modified: 30 December February 2015*