Learn R Programming

VGAM (version 0.7-5)

gammahyp: Gamma Hyperbola Bivariate Distribution

Description

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

Usage

gammahyp(ltheta="loge", 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).

Value

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

Details

The joint probability density function is given by $$f(y_1,y_2) = \exp( -e^{-\theta} y_1 / \theta - \theta y_2 )$$ for $\theta > 0$, $y_1 > 0$, $y_2 > 1$. The random variables $Y_1$ and $Y_2$ are independent. The marginal distribution of $Y_1$ is an exponential distribution with rate parameter $\exp(-\theta)/\theta$. The marginal distribution of $Y_2$ 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.

References

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

See Also

exponential.

Examples

Run this code
x  = runif(n <- 1000)
theta = exp(-2+x)
y1 = rexp(n, rate=exp(-theta)/theta)
y2 = 1 + rexp(n, rate=theta)
fit = vglm(cbind(y1,y2) ~ x, fam=gammahyp(expected=TRUE), trace=TRUE)
fit = vglm(cbind(y1,y2) ~ x, fam=gammahyp, trace=TRUE, crit="coef")
coef(fit, matrix=TRUE)
Coef(fit)
fitted(fit)[1:4,]
summary(fit)

Run the code above in your browser using DataLab