Learn R Programming

VGAM (version 0.8-2)

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(), 
               method.init = 1, ilambda = 1,
               shrinkage.init = 0.99, 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.
method.init, shrinkage.init, zero
See CommonVGAMffArguments for more information.

Value

pkg

SuppDists

Details

The standard (``canonical'') form of 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)$. The mean is returned as the fitted values.

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
idat <- data.frame(x2 = runif(nn <- 1000))
idat <- transform(idat, mymu   = exp(2 + 1 * x2),
                        Lambda = exp(2 + 1 * x2))
idat <- transform(idat, y = rinv.gaussian(nn, mu = mymu, lambda = Lambda))
fit1 <-   vglm(y ~ x2, inv.gaussianff, idat, trace = TRUE)
rrig <- rrvglm(y ~ x2, inv.gaussianff, idat, trace = TRUE)
coef(fit1, matrix = TRUE)
coef(rrig, matrix = TRUE)
Coef(rrig)
summary(fit1)

Run the code above in your browser using DataLab