50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


VGAM (version 1.0-5)

gamma1: 1-parameter Gamma Distribution

Description

Estimates the 1-parameter gamma distribution by maximum likelihood estimation.

Usage

gamma1(link = "loge", zero = NULL)

Arguments

link

Link function applied to the (positive) shape parameter. See Links for more choices and general information.

zero

Value

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

Details

The density function is given by f(y)=exp(y)×yshape1/Γ(shape) for shape>0 and y>0. Here, Γ(shape) is the gamma function, as in gamma. The mean of Y (returned as the fitted values) is μ=shape, and the variance is σ2=shape.

References

Most standard texts on statistical distributions describe the 1-parameter gamma distribution, e.g.,

Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011) Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.

See Also

gammaR for the 2-parameter gamma distribution, lgamma1, lindley, simulate.vlm.

Examples

Run this code
# NOT RUN {
gdata <- data.frame(y = rgamma(n = 100, shape = exp(3)))
fit <- vglm(y ~ 1, gamma1, data = gdata, trace = TRUE, crit = "coef")
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)
# }

Run the code above in your browser using DataLab