gammaff.mm {VGAM} | R Documentation |
Multivariate Gamma Family Function: Mathai and Moschopoulos (1992)
Description
Estimate the scale parameter and shape parameters of the Mathai and Moschopoulos (1992) multivariate gamma distribution by maximum likelihood estimation.
Usage
gammaff.mm(lscale = "loglink", lshape = "loglink",
iscale = NULL, ishape = NULL, imethod = 1,
eq.shapes = FALSE, sh.byrow = TRUE, zero = "shape")
Arguments
lscale , lshape |
Link functions applied to the (positive)
parameters |
iscale , ishape , sh.byrow |
Optional initial values.
The default is to compute them internally.
Argument |
eq.shapes |
Logical.
Constrain the shape parameters to be equal?
See also |
imethod , zero |
Details
This distribution has the
bivariate gamma distribution
bigamma.mckay
as a special case.
Let be the number of columns of the
response matrix
y
.
Then the
joint probability density function is given by
for ,
, ...,
and
.
Also,
.
Here,
is
the
gamma
function,
By default, the linear/additive predictors are
,
,
...,
.
Hence
.
The marginal distributions are gamma,
with shape parameters
up to
, but they have a
common scale parameter
.
The fitted value returned
is a matrix with columns equalling
their respective means;
for column it is
sum(shape[1:j]) * scale
.
The correlations are always positive;
for columns and
with
,
the correlation is
sqrt(sum(shape[1:j]) /sum(shape[1:k]))
.
Hence the variance of column
is
sum(shape[1:j]) * scale^2
.
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 matrix with at least two columns. Apart from the first column, the differences between a column and its LHS adjacent column must all be positive. That is, each row must be strictly increasing.
Author(s)
T. W. Yee
References
Mathai, A. M. and Moschopoulos, P. G. (1992). A form of multivariate gamma distribution. Ann. Inst. Statist. Math., 44, 97–106.
See Also
Examples
## Not run:
data("mbflood", package = "VGAMdata")
mbflood <- transform(mbflood, VdivD = V / D)
fit <- vglm(cbind(Q, y2 = Q + VdivD) ~ 1,
gammaff.mm, trace = TRUE, data = mbflood)
coef(fit, matrix = TRUE)
Coef(fit)
vcov(fit)
colMeans(depvar(fit)) # Check moments
head(fitted(fit), 1)
## End(Not run)