Learn R Programming

VGAM (version 0.9-1)

wald: Wald Distribution Family Function

Description

Estimates the parameter of the standard Wald distribution by maximum likelihood estimation.

Usage

wald(link.lambda = "loge", init.lambda = NULL)

Arguments

link.lambda
Parameter link function for the $\lambda$ parameter. See Links for more choices and general information.
init.lambda
Initial value for the $\lambda$ parameter. The default means an initial value is chosen internally.

Value

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

Details

The standard Wald distribution is a special case of the inverse Gaussian distribution with $\mu=1$. It has a density that can be written as $$f(y;\lambda) = \sqrt{\lambda/(2\pi y^3)} \; \exp\left(-\lambda (y-1)^2/(2 y)\right)$$ where $y>0$ and $\lambda>0$. The mean of $Y$ is $1$ (returned as the fitted values) and its variance is $1/\lambda$. By default, $\eta=\log(\lambda)$.

References

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

See Also

inv.gaussianff.

Examples

Run this code
wdata <- data.frame(y = rgamma(n = 1000, shape = 1)) # Not inverse Gaussian!!
fit <- vglm(y ~ 1, wald(init = 0.2), wdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab