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

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

Arguments

llambda,ilambda

See CommonVGAMffArguments for information.

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)\).

Value

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

References

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

Author

T. W. Yee

Note

The VGAM family function inv.gaussianff estimates the location parameter \(\mu\) too.

Examples

wdata <- data.frame(y = rinv.gaussian(1000, mu =  1, exp(1)))
wfit <- vglm(y ~ 1, waldff(ilambda = 0.2), wdata, trace = TRUE)
#> Iteration 1: loglikelihood = -1138.3796
#> Iteration 2: loglikelihood = -858.26854
#> Iteration 3: loglikelihood = -743.30758
#> Iteration 4: loglikelihood = -727.87989
#> Iteration 5: loglikelihood = -727.63692
#> Iteration 6: loglikelihood = -727.63686
#> Iteration 7: loglikelihood = -727.63686
coef(wfit, matrix = TRUE)
#>             loglink(lambda)
#> (Intercept)       0.9366431
Coef(wfit)
#>   lambda 
#> 2.551402 
summary(wfit)
#> 
#> Call:
#> vglm(formula = y ~ 1, family = waldff(ilambda = 0.2), data = wdata, 
#>     trace = TRUE)
#> 
#> Coefficients: 
#>             Estimate Std. Error z value Pr(>|z|)    
#> (Intercept)  0.93664    0.04472   20.94   <2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Name of linear predictor: loglink(lambda) 
#> 
#> Log-likelihood: -727.6369 on 999 degrees of freedom
#> 
#> Number of Fisher scoring iterations: 7 
#> 
#> No Hauck-Donner effect found in any of the estimates
#>