inv.gaussianff {VGAM} | R Documentation |
Estimates the two parameters of the inverse Gaussian distribution by maximum likelihood estimation.
inv.gaussianff(lmu = "loge", llambda = "loge", emu = list(), elambda = list(), imethod = 1, ilambda = 1, shrinkage.init = 0.99, zero = NULL)
lmu, llambda |
Parameter link functions for the mu and
lambda parameters.
See |
emu, elambda |
List. Extra argument for each of the links.
See |
ilambda |
Initial value for the lambda parameter. |
imethod, shrinkage.init, zero |
See |
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(-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). The mean is returned as the fitted values.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
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.
T. W. Yee
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.
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.
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)