R: Generalized Gamma distribution family function

gengamma.stacy {VGAM} | R Documentation

## Generalized Gamma distribution family function

### Description

Estimation of the 3-parameter generalized gamma distribution proposed by Stacy (1962).

### Usage

    gengamma.stacy(lscale = "loge", ld = "loge", lk = "loge",
                   iscale = NULL, id = NULL, ik = NULL,
                   gscale    = exp(-5:5), gshape1.d = exp(-5:5),
                   gshape2.k = exp(-5:5), zero = NULL)

### Arguments

`lscale, ld, lk` | Parameter link function applied to each of the positive parameters b, d and k, respectively. See `Links` for more choices.
`iscale, id, ik` | Initial value for b, d and k, respectively. The defaults mean an initial value is determined internally for each.
`gscale, gshape1.d, gshape2.k` | See `CommonVGAMffArguments` for information. Replaced by `iscale`, `id` etc. if given.
`zero` | See `CommonVGAMffArguments` for information.

### Details

The probability density function can be written

f(y;b,d,k) = d * b^(-d*k) * y^(d*k-1) * exp(-(y/b)^d) / gamma(k)

for scale parameter b > 0, and d > 0, k > 0, and y > 0. The mean of Y is b*gamma(k+1/d)/gamma(k) (returned as the fitted values), which equals b*k if d=1.

There are many special cases, as given in Table 1 of Stacey and Mihram (1965). In the following, the parameters are in the order b,d,k. The special cases are: Exponential f(y;b,1,1), Gamma f(y;b,1,k), Weibull f(y;b,d,1), Chi Squared f(y;2,1,a/2) with a degrees of freedom, Chi f(y;sqrt(2),2,a/2) with a degrees of freedom, Half-normal f(y;sqrt(2),2,1/2), Circular normal f(y;sqrt(2),2,1), Spherical normal f(y;sqrt(2),2,3/2), Rayleigh f(y;c sqrt(2),2,1) where c>0.

### Value

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

### Warning

Several authors have considered maximum likelihood estimation for the generalized gamma distribution and have found that the Newton-Raphson algorithm does not work very well and that the existence of solutions to the log-likelihood equations is sometimes in doubt. Although Fisher scoring is used here, it is likely that the same problems will be encountered. It appears that large samples are required, for example, the estimator of k became asymptotically normal only with 400 or more observations. It is not uncommon for maximum likelihood estimates to fail to converge even with two or three hundred observations. With covariates, even more observations are needed to increase the chances of convergence. Using covariates is not advised unless the sample size is at least a few thousand.

### Note

The notation used here differs from Stacy (1962) and Prentice (1974). Poor initial values may result in failure to converge so if there are covariates and there are convergence problems, try using the `zero` argument (e.g., `zero = 2:3`) or the `ik` argument.

### Author(s)

T. W. Yee

### References

Stacy, E. W. (1962) A generalization of the gamma distribution. Annals of Mathematical Statistics, 33(3), 1187–1192.

Stacy, E. W. and Mihram, G. A. (1965) Parameter estimation for a generalized gamma distribution. Technometrics, 7, 349–358.

Prentice, R. L. (1974) A log gamma model and its maximum likelihood estimation. Biometrika, 61, 539–544.

### See Also

`rgengamma.stacy`, `gamma1`, `gamma2`, `prentice74`, `simulate.vlm`.

### Examples

    k <- exp(-1); Scale = exp(1)
    gdata <- data.frame(y = rgamma(1000, shape = k, scale = Scale))
    fit <- vglm(y ~ 1, gengamma.stacy, data = gdata, trace = TRUE)
    coef(fit, matrix = TRUE)

[Package VGAM version 1.0-3 Index]