gammahyperbola: Gamma Hyperbola Bivariate Distribution

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/family.bivariate.R

Description

Estimate the parameter of a gamma hyperbola bivariate distribution by maximum likelihood estimation.

Usage

1
gammahyperbola(ltheta = "loglink", itheta = NULL, expected = FALSE)

Arguments

ltheta

Link function applied to the (positive) parameter theta. See Links for more choices.

itheta

Initial value for the parameter. The default is to estimate it internally.

expected

Logical. FALSE means the Newton-Raphson (using the observed information matrix) algorithm, otherwise the expected information matrix is used (Fisher scoring algorithm).

Details

The joint probability density function is given by

f(y1,y2) = exp( -exp(-theta) * y1 / theta - theta * y2)

for theta > 0, y1 > 0, y2 > 1. The random variables Y1 and Y2 are independent. The marginal distribution of Y1 is an exponential distribution with rate parameter exp(-theta)/theta. The marginal distribution of Y2 is an exponential distribution that has been shifted to the right by 1 and with rate parameter theta. The fitted values are stored in a two-column matrix with the marginal means, which are theta * exp(theta) and 1 + 1/theta.

The default algorithm is Newton-Raphson because Fisher scoring tends to be much slower for this distribution.

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.

Author(s)

T. W. Yee

References

Reid, N. (2003). Asymptotics and the theory of inference. Annals of Statistics, 31, 1695–1731.

See Also

exponential.

Examples

1
2
3
4
5
6
7
8
9
gdata <- data.frame(x2 = runif(nn <- 1000))
gdata <- transform(gdata, theta = exp(-2 + x2))
gdata <- transform(gdata, y1 = rexp(nn, rate = exp(-theta)/theta),
                          y2 = rexp(nn, rate = theta) + 1)
fit <- vglm(cbind(y1, y2) ~ x2, gammahyperbola(expected = TRUE), data = gdata)
coef(fit, matrix = TRUE)
Coef(fit)
head(fitted(fit))
summary(fit)

VGAM documentation built on Jan. 16, 2021, 5:21 p.m.