betaprime                package:VGAM                R Documentation

_T_h_e _B_e_t_a-_P_r_i_m_e _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

    link: Parameter link function applied to the two (positive) shape
          parameters. See 'Links' for more choices.

  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.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

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

_N_o_t_e:

     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_.

_A_u_t_h_o_r(_s):

     Thomas W. Yee

_R_e_f_e_r_e_n_c_e_s:

     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 <URL:
     http://www.stat.auckland.ac.nz/~yee> contains further information
     and examples.

_S_e_e _A_l_s_o:

     'betaff'.

_E_x_a_m_p_l_e_s:

     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

