50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

VGAM (version 1.1-9)

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 = "loglink", llambda = "loglink",
      imethod = 1, ilambda = NULL,
      parallel = FALSE, ishrinkage = 0.99, zero = NULL)

Value

An object of class "vglmff"

(see vglmff-class). The object is used by modelling functions such as vglm,

rrvglm

and vgam.

Arguments

lmu, llambda

Parameter link functions for the μ and λ parameters. See Links for more choices.

ilambda, parallel

See CommonVGAMffArguments for more information. If parallel = TRUE then the constraint is not applied to the intercept.

imethod, ishrinkage, zero

See CommonVGAMffArguments for information.

Author

T. W. Yee

Details

The standard (``canonical'') form of the inverse Gaussian distribution has a density that can be written as f(y;μ,λ)=λ/(2πy3)exp(λ(yμ)2/(2yμ2)) where y>0, μ>0, and λ>0. The mean of Y is μ and its variance is μ3/λ. By default, η1=log(μ) and η2=log(λ). The mean is returned as the fitted values. This VGAM family function can handle multiple responses (inputted as a matrix).

References

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

Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011). Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.

See Also

Inv.gaussian, waldff, bisa.

The R package SuppDists has several functions for evaluating the density, distribution function, quantile function and generating random numbers from the inverse Gaussian distribution.

Examples

Run this code
idata <- data.frame(x2 = runif(nn <- 1000))
idata <- transform(idata, mymu   = exp(2 + 1 * x2),
                          Lambda = exp(2 + 1 * x2))
idata <- transform(idata, y = rinv.gaussian(nn, mu = mymu, Lambda))
fit1 <-   vglm(y ~ x2, inv.gaussianff, data = idata, trace = TRUE)
rrig <- rrvglm(y ~ x2, inv.gaussianff, data = idata, trace = TRUE)
coef(fit1, matrix = TRUE)
coef(rrig, matrix = TRUE)
Coef(rrig)
summary(fit1)

Run the code above in your browser using DataLab