betaprime {VGAM}R Documentation

The Beta-Prime Distribution

Description

Estimation of the two shape parameters of the beta-prime distribution by maximum likelihood estimation.

Usage

betaprime(link = "loge", earg=list(), i1 = 2, i2 = NULL, zero = NULL)

Arguments

link Parameter link function applied to the two (positive) shape parameters. See Links for more choices.
earg List. Extra argument for each of the links. See earg in Links for general information.
i1, i2 Initial values for the first and second shape parameters. A NULL value means it is obtained in the initialize slot. Note that i2 is obtained using i1.
zero An integer-valued vector specifying which linear/additive predictors are modelled as intercepts only. The value must be from the set {1,2} corresponding respectively to shape1 and shape2 respectively. If zero=NULL then both parameters are modelled with the explanatory variables.

Details

The beta-prime distribution is given by

f(y) = y^(shape1-1) * (1+y)^(-shape1-shape2) / B(shape1,shape2)

for y > 0. The shape parameters are positive, and here, B is the beta function. The mean of Y is shape1 / (shape2-1) provided shape2>1.

If Y has a Beta(shape1,shape2) distribution then Y/(1-Y) and (1-Y)/Y have a Betaprime(shape1,shape2) and Betaprime(shape2,shape1) distribution respectively. Also, if Y1 has a gamma(shape1) distribution and Y2 has a gamma(shape2) distribution then Y1/Y2 has a Betaprime(shape1,shape2) distribution.

Value

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

Note

The response must have positive values only.

The beta-prime distribution is also known as the beta distribution of the second kind or the inverted beta distribution.

Author(s)

Thomas W. Yee

References

Johnson, N. L. and Kotz, S. and Balakrishnan, N. (1995) Chapter 25 of: Continuous Univariate Distributions, 2nd edition, Volume 2, New York: Wiley.

Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.

See Also

betaff.

Examples

yb = rbeta(n <- 1000, shape1=exp(1), shape2=exp(3))
y1 = (1-yb)/yb
y2 = yb/(1-yb)
y3 = rgamma(n, exp(3)) / rgamma(n, exp(2))

fit1 = vglm(y1 ~ 1, betaprime, trace=TRUE)
coef(fit1, matrix=TRUE)

fit2 = vglm(y2 ~ 1, betaprime, trace=TRUE)
coef(fit2, matrix=TRUE)

fit3 = vglm(y3 ~ 1, betaprime, trace=TRUE)
coef(fit3, matrix=TRUE)

# Compare the fitted values
mean(y3)
fitted(fit3)[1:5]
Coef(fit3)  # Useful for intercept-only models

[Package VGAM version 0.7-7 Index]