Learn R Programming

VGAM (version 0.8-1)

inv.gaussianff: Inverse Gaussian Distribution Family Function

Description

Estimates the two parameters of the inverse Gaussian distribution by maximum likelihood estimation.

Usage

inv.gaussianff(lmu="loge", llambda="loge", emu=list(), elambda=list(),
               ilambda=1, zero=NULL)

Arguments

lmu, llambda
Parameter link functions for the $\mu$ and $\lambda$ parameters. See Links for more choices.
emu, elambda
List. Extra argument for each of the links. See earg in Links for general information.
ilambda
Initial value for the $\lambda$ parameter.
zero
An integer-valued vector specifying which linear/additive predictors $\eta_j$ are modelled as intercepts only. The values must be from the set {1,2}.

Value

pkg

SuppDists

Details

The inverse Gaussian distribution has a density that can be written as $$f(y;\mu,\lambda) = \sqrt{\lambda/(2\pi y^3)} \exp\left(-\lambda (y-\mu)^2/(2 \mu^2 y)\right)$$ where $y>0$, $\mu>0$, and $\lambda>0$. The mean of $Y$ is $\mu$ and its variance is $\mu^3/\lambda$. By default, $\eta_1=\log(\mu)$ and $\eta_2=\log(\lambda)$.

References

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

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.

See Also

Inv.gaussian, wald, bisa.

The R

Examples

Run this code
n = 1000
shape = exp(3)
y = rinv.gaussian(n=n, mu=exp(2), lambda=shape)
fit = vglm(y ~ 1, inv.gaussianff(ilam=shape), trace=TRUE)
coef(fit, matrix=TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab