Estimates the (1-parameter) Lindley distribution by maximum likelihood estimation.

lindley(link = "loglink", itheta = NULL, zero = NULL)

Arguments

Link function applied to the (positive) parameter. See Links for more choices.

itheta, zero

See CommonVGAMffArguments for information.

Details

The density function is given by $$f(y; \theta) = \theta^2 (1 + y) \exp(-\theta y) / (1 + \theta)$$ for \(\theta > 0\) and \(y > 0\). The mean of \(Y\) (returned as the fitted values) is \(\mu = (\theta + 2) / (\theta (\theta + 1))\). The variance is \((\theta^2 + 4 \theta + 2) / (\theta (\theta + 1))^2\).

Value

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

References

Lindley, D. V. (1958). Fiducial distributions and Bayes' theorem. Journal of the Royal Statistical Society, Series B, Methodological, 20, 102–107.

Ghitany, M. E. and Atieh, B. and Nadarajah, S. (2008). Lindley distribution and its application. Math. Comput. Simul., 78, 493–506.

Author

T. W. Yee

Note

This VGAM family function can handle multiple responses (inputted as a matrix). Fisher scoring is implemented.

See also

Examples

ldata <- data.frame(y = rlind(n = 1000, theta = exp(3)))
fit <- vglm(y ~ 1, lindley, data = ldata, trace = TRUE, crit = "coef")
#> Iteration 1: coefficients = 0.67029903
#> Iteration 2: coefficients = 1.4587669
#> Iteration 3: coefficients = 2.169915
#> Iteration 4: coefficients = 2.6931435
#> Iteration 5: coefficients = 2.9225853
#> Iteration 6: coefficients = 2.9566605
#> Iteration 7: coefficients = 2.9573048
#> Iteration 8: coefficients = 2.9573051
coef(fit, matrix = TRUE)
#>             loglink(theta)
#> (Intercept)       2.957305
Coef(fit)
#>    theta 
#> 19.24603 
summary(fit)
#> 
#> Call:
#> vglm(formula = y ~ 1, family = lindley, data = ldata, trace = TRUE, 
#>     crit = "coef")
#> 
#> Coefficients: 
#>             Estimate Std. Error z value Pr(>|z|)    
#> (Intercept)   2.9573     0.0302   97.92   <2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Name of linear predictor: loglink(theta) 
#> 
#> Log-likelihood: 1909.152 on 999 degrees of freedom
#> 
#> Number of Fisher scoring iterations: 8 
#> 
#> No Hauck-Donner effect found in any of the estimates
#>