invbinomial               package:VGAM               R Documentation

_I_n_v_e_r_s_e _B_i_n_o_m_i_a_l _D_i_s_t_r_i_b_u_t_i_o_n _F_a_m_i_l_y _F_u_n_c_t_i_o_n

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

     Estimates the two parameters of an inverse binomial distribution
     by maximum likelihood estimation.

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

     invbinomial(lrho="elogit", llambda="loge",
                 erho=if(lrho=="elogit") list(min = 0.5, max = 1) else list(),
                 elambda=list(), irho=NULL, ilambda=NULL, zero=NULL)

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

lrho, llambda: Link function for the rho and lambda parameters. See
          'Links' for more choices.

erho, elambda: List. Extra argument for each of the links. See 'earg'
          in 'Links' for general information.

irho, ilambda: Numeric. Optional initial values for rho and lambda.

    zero: See 'CommonVGAMffArguments'.

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

     The inverse binomial distribution of Yanagimoto (1989) has density
     function

 f(y;rho,lambda) =  (lambda * Gamma(2y+lambda)) * [rho*(1-rho)]^y * rho^lambda / (Gamma(y+1) * Gamma(y+lambda+1))

     where y=0,1,2,... and 0.5 < rho < 1, and lambda > 0. The first two
     moments exist for rho>0.5; then the mean is
     lambda*(1-rho)/(2*rho-1) (returned as the fitted values) and the
     variance is lambda*rho*(1-rho)/(2*rho-1)^3. The inverse binomial
     distribution is a special case of the generalized negative
     binomial distribution of Jain and Consul (1971). It holds that
     Var(Y) > E(Y) so that the inverse binomial distribution is
     overdispersed compared with the Poisson distribution.

_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:

     This 'VGAM' family function only works reasonably well with
     intercept-only models. Good initial values are needed; if
     convergence failure occurs use 'irho' and/or 'ilambda'.

     Some elements of the working weight matrices use the expected
     information matrix while other elements use the observed
     information matrix. Yet to do: using the mean and the reciprocal
     of lambda results in a EIM that is diagonal.

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

     T. W. Yee

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

     Yanagimoto, T. (1989) The inverse binomial distribution as a
     statistical model. _Communications in Statistics: Theory and
     Methods_, *18*, 3625-3633.

     Jain, G. C. and Consul, P. C. (1971) A generalized negative
     binomial distribution. _SIAM Journal on Applied Mathematics_,
     *21*, 501-513.

     Jorgensen, B. (1997) _The Theory of Dispersion Models_. London:
     Chapman & Hall

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

     'negbinomial', 'poissonff'.

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

     y <- rnbinom(n <- 1000, mu=exp(3), size=exp(1))
     fit  <- vglm(y ~ 1, invbinomial, trace=TRUE)
     c(mean(y), head(fitted(fit)))
     summary(fit)
     coef(fit, matrix=TRUE)
     Coef(fit)
     sum(weights(fit))  # sum of the prior weights
     sum(weights(fit, type="w")) # sum of the working weights

