Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

VGAM (version 1.0-3)

waldff: Wald Distribution Family Function

Description

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

Usage

waldff(llambda = "loge", ilambda = NULL)

Arguments

llambda,ilambda

See CommonVGAMffArguments for information.

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 μ=1. It has a density that can be written as f(y;λ)=λ/(2πy3)exp(λ(y1)2/(2y)) where y>0 and λ>0. The mean of Y is 1 (returned as the fitted values) and its variance is 1/λ. By default, η=log(λ).

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, rinv.gaussian.

Examples

Run this code
# NOT RUN {
wdata <- data.frame(y = rinv.gaussian(n = 1000, mu =  1, lambda = exp(1)))
wfit <- vglm(y ~ 1, waldff(ilambda = 0.2), data = wdata, trace = TRUE)
coef(wfit, matrix = TRUE)
Coef(wfit)
summary(wfit)
# }

Run the code above in your browser using DataLab