binomialff               package:VGAM               R Documentation

_B_i_n_o_m_i_a_l _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:

     Family function for fitting generalized linear models to binomial
     responses, where the dispersion parameter may be known or unknown.

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

     binomialff(link = "logit", dispersion = 1, mv = FALSE, onedpar = !mv,
                parallel = FALSE, earg = NULL, zero = NULL)

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

     The notation M is used to denote the number of linear/additive
     predictors.

    link: Link function. See 'Links' for more choices.

dispersion: Dispersion parameter. By default, maximum likelihood is
          used to estimate the model because it is known.  However, the
          user can specify 'dispersion = 0' to have it estimated, or
          else specify a known positive value (or values if 'mv' is
          'TRUE').

      mv: Multivariate response? If 'TRUE', then the response is
          interpreted as M binary responses, where M is the number of
          columns of the response matrix. In this case, the response
          matrix should have zero/one values only.

          If 'FALSE' and the response is a (2-column) matrix, then the
          number of successes is given in the first column, and the
          second column is the number of failures.

 onedpar: One dispersion parameter? If 'mv', then a separate dispersion
          parameter will be computed for each response (column), by
          default. Setting 'onedpar=TRUE' will pool them so that there
          is only one dispersion parameter to be estimated.

parallel: A logical or formula. Used only if 'mv' is 'TRUE'.  This
          argument allows for the parallelism assumption whereby the
          regression coefficients for a variable is constrained to be
          equal over the M linear/additive predictors.

    earg: Extra argument optionally used by the link function. See
          'Links' for more information.

    zero: An integer-valued vector specifying which linear/additive
          predictors are modelled as intercepts only.  The values must
          be from the set {1,2,...,M}, where M is the number of columns
          of the matrix response.

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

     If the dispersion parameter is unknown, then the resulting
     estimate is not fully a maximum likelihood estimate (see pp.124-8
     of McCullagh and Nelder, 1989).

     A dispersion parameter that is less/greater than unity corresponds
     to under-/over-dispersion relative to the binomial model. 
     Over-dispersion is more common in practice.

     Setting 'mv=TRUE' is necessary when fitting a Quadratic RR-VGLM
     (see 'cqo') because the response is a matrix of M columns (e.g.,
     one column per species). Then there will be M dispersion
     parameters (one per column of the response matrix).

     When used with 'cqo' and 'cao', it may be preferable to use the
     'cloglog' link.

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

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

_W_a_r_n_i_n_g:

     With a multivariate response, assigning a known dispersion
     parameter for _each_ response is not handled well yet.  Currently,
     only a single known dispersion parameter is handled well.

_N_o_t_e:

     If 'mv' is 'FALSE' (default), then the response can be of one of
     three formats: a factor (first level taken as success), a vector
     of proportions of success, or a 2-column matrix (first column =
     successes) of counts.  The argument 'weights' in the modelling
     function can also be specified. In particular, for a general
     vector of proportions, you will need to specify 'weights' because
     the number of trials is needed.

     If 'mv' is 'TRUE', then the matrix response can only be of one
     format: a matrix of 1's and 0's (1=success).

     The call 'binomialff(dispersion=0, ...)' is equivalent to
     'quasibinomialff(...)'.  The latter was written so that R users of
     'quasibinomial()' would only need to add a  ``'ff''' to the end of
     the family function name.

     Regardless of whether the dispersion parameter is to be estimated
     or not, its value can be seen from the output from the 'summary()'
     of the object.

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

     Thomas W. Yee

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

     McCullagh, P. and Nelder, J. A. (1989) _Generalized Linear
     Models_, 2nd ed. London: Chapman & Hall.

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

     'quasibinomialff', 'Links', 'rrvglm', 'cqo', 'cao', 'zibinomial',
     'binomial'.

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

     quasibinomialff()
     quasibinomialff(link="probit")

     data(hunua)
     fit = vgam(agaaus ~ poly(altitude, 2), binomialff(link=cloglog), hunua)
     ## Not run: 
     attach(hunua)
     plot(altitude, agaaus, col="blue", ylab="P(agaaus=1)",
          main="Presence/absence of Agathis australis", las=1)
     o = order(altitude)
     lines(altitude[o], fitted(fit)[o], col="red", lwd=2)
     detach(hunua)
     ## End(Not run)

