gamma1 {VGAM}R Documentation

1-parameter Gamma Distribution

Description

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

Usage

gamma1(link = "loge", earg=list())

Arguments

link Link function applied to the (positive) shape parameter. See Links for more choices.
earg List. Extra argument for the link. See earg in Links for general information.

Details

The density function is given by

f(y) = exp(-y) y^(shape-1) / gamma(shape)

for shape > 0 and y > 0. Here, gamma(shape) is the gamma function, as in gamma. The mean of Y (returned as the fitted values) is mu=shape, and the variance is sigma^2 = shape.

Value

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

Note

This VGAM family function can handle a multivariate (matrix) response.

The parameter shape matches with shape in rgamma. The argument rate in rgamma is assumed 1 for this family function.

If rate is unknown use the family function gamma2.ab to estimate it too.

Author(s)

T. W. Yee

References

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

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.

See Also

gamma2.ab for the 2-parameter gamma distribution, lgammaff.

Examples

y = rgamma(n=100, shape= exp(3))
fit = vglm(y ~ 1, gamma1, trace=TRUE, crit="c")
coef(fit, matrix=TRUE)
Coef(fit)
summary(fit)

[Package VGAM version 0.7-7 Index]