inv.gaussianff {VGAM}R Documentation

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}.

Details

The inverse Gaussian distribution has a density that can be written as

f(y;mu,lambda) = sqrt(lambda/(2*pi*y^3)) * exp(-lambda*(y-mu)^2/(2*mu^2*y))

where y>0, mu>0, and lambda>0. The mean of Y is mu and its variance is mu^3/lambda. By default, eta1=log(mu) and eta2=log(lambda).

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.

Note

The inverse Gaussian distribution can be fitted (to a certain extent) using the usual GLM framework involving a scale parameter. This family function is different from that approach in that it estimates both parameters by full maximum likelihood estimation.

Author(s)

T. W. Yee

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{} package SuppDists has several functions for evaluating the density, distribution function, quantile function and generating random numbers from the inverse Gaussian distribution.

Examples

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)

[Package VGAM version 0.7-7 Index]