mckaygamma2 {VGAM} | R Documentation

## McKay's Bivariate Gamma Distribution

### Description

Estimate the two parameters of McKay's bivariate gamma distribution by maximum likelihood estimation.

### Usage

    mckaygamma2(la = "loge", lp = "loge", lq = "loge",
                ia = NULL, ip = 1, iq = 1, zero = NULL)

### Arguments

`la, lp, lq` | Link functions applied to the (positive) parameters a, p and q. See `Links` for more choices.
`ia, ip, iq` | Initial values for a, p and q. The default for a is to estimate it using `ip` and `iq`.
`zero` | An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The values must be from the set {1,2,3}. The default is none of them.

### Details

The joint probability density function is given by

f(y1,y2;a,p,q) = a^(p+q) y1^(p-1) (y2-y1)^(q-1) exp(-a y2) / [gamma(p) gamma(q)]

for a > 0, p > 0, q > 0 and 0<y1<y2. Here, gamma is the gamma function, as in `gamma`. By default, the linear/additive predictors are eta1=log(a), eta2=log(p), eta3=log(q).

Although Fisher scoring and Newton-Raphson coincide for this distribution, faster convergence may be obtained by choosing better values for the arguments `ip` and `iq`.

### Value

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

### Note

The response must be a two column matrix. Currently, the fitted value is a matrix with two columns; the first column has values (p+q)/a for the mean of `pmin(y1,y2)`, while the second column is filled with `NA` for the unknown mean of `pmax(y1,y2)`. The data are sorted internally and the user need not input the data presorted.

### Author(s)

T. W. Yee

### References

McKay, A. T. (1934) Sampling from batches. Journal of the Royal Statistical Society—Supplement, 1, 207–216.

Kotz, S. and Balakrishnan, N. and Johnson, N. L. (2000) Continuous Multivariate Distributions Volume 1: Models and Applications, 2nd edition, New York: Wiley.

### See Also

`gamma2`.

### Examples

    y1 = rgamma(n <- 200, shape=4)
    y2 = rgamma(n, shape=8)
    ymat = cbind(y1,y2)
    fit = vglm(ymat ~ 1, fam=mckaygamma2, trace=TRUE)
    coef(fit, matrix=TRUE)
    Coef(fit)
    vcov(fit)
    head(fitted(fit))
    summary(fit)

[Package VGAM version 0.7-9 Index]