mckaygamma2               package:VGAM               R Documentation

_M_c_K_a_y'_s _B_i_v_a_r_i_a_t_e _G_a_m_m_a _D_i_s_t_r_i_b_u_t_i_o_n

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

     Estimate the two parameters of McKay's bivariate gamma
     distribution using maximum likelihood estimation.

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

     mckaygamma2(la = "loge", lp = "loge", lq = "loge",
                 ia = NULL, ip = 1, iq = 1, zero = NULL)

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

la, lp, lq: Link functions applied to the (positive) parameters a, p
          and q. See 'Links' for more choices.

ia, ip, iq: Initial values for a, p and q. The default for a is to
          estimate it using 'ip' and 'iq'.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only. The values must
          be from the set {1,2,3}. The default is none of them.

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

     The joint probability density function is given by

 f(y1,y2) = a^(p+q) y1^(p-1) (y2-y1)^(q-1) exp(-a y2) / [gamma(p) gamma(q)]

     for a > 0, p > 0, q > 0 and 0<y1<y2. Here, gamma is the gamma
     function, as in 'gamma'. By default, the linear/additive
     predictors are eta1=log(a), eta2=log(p), eta3=log(q).

     Although Fisher scoring and Newton-Raphson coincide for this
     distribution, faster convergence may be obtained by choosing
     better values for the arguments 'ip' and 'iq'.

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

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

_N_o_t_e:

     The response must be a two column matrix. Currently, the fitted
     value is a matrix with two columns; the first column has values
     (p+q)/a for the mean of 'pmin(y1,y2)', while the second column is
     filled with 'NA' for the unknown mean of 'pmax(y1,y2)'. The data
     are sorted internally and the user need not input the data
     presorted.

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

     T. W. Yee

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

     McKay, A. T. (1934) Sampling from batches. _Journal of the Royal
     Statistical Society-Supplement_, *1*, 207-216.

     Kotz, S. and Balakrishnan, N. and Johnson, N. L. (2000)
     _Continuous Multivariate Distributions Volume 1: Models and
     Applications_, 2nd edition, New York: Wiley.

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

     'gamma2'.

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

     y1 = rgamma(n <- 200, shape=4)
     y2 = rgamma(n, shape=8)
     ymat = cbind(y1,y2)
     fit = vglm(ymat ~ 1, fam=mckaygamma2, trace=TRUE)
     coef(fit, matrix=TRUE)
     Coef(fit)
     vcov(fit)
     fitted(fit)[1:5,]
     summary(fit)

