quasibinomialff             package:VGAM             R Documentation

_Q_u_a_s_i-_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 parameters are unknown.

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

     quasibinomialff(link = "logit", mv = FALSE, onedpar = !mv,
                     parallel = FALSE, zero = NULL)

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

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

      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.

    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:

     The final model is not fully estimated by maximum likelihood since
     the dispersion parameter is unknown (see pp.124-8 of McCullagh and
     Nelder (1989) for more details).

     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 will be a matrix of M columns
     (e.g., one column per species). Then there will be M dispersion
     parameters (one per column of the response).

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

_N_o_t_e:

     If 'mv' is 'FALSE' (the 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).

     This function is only a front-end to the 'VGAM' family function
     'binomialff()'; indeed, 'quasibinomialff(...)' is equivalent to
     'binomialff(..., dispersion=0)'.  Here,  the argument
     'dispersion=0' signifies that the dispersion parameter is to be
     estimated.

     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:

     'binomialff', 'rrvglm', 'cqo', 'cao', 'logit', 'probit',
     'cloglog', 'cauchit', 'poissonff', 'quasipoissonff',
     'quasibinomial'.

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

     quasibinomialff()
     quasibinomialff(link="probit")

     # Nonparametric logistic regression
     data(hunua)
     hunua = transform(hunua, a.5 = sqrt(altitude))    # Transformation of altitude
     fit1 = vglm(agaaus ~ poly(a.5, 2), quasibinomialff, hunua)
     fit2 = vgam(agaaus ~ s(a.5, df=2), quasibinomialff, hunua)
     ## Not run: 
     plot(fit2, se=TRUE, llwd=2, lcol="red", scol="red",
          xlab="sqrt(altitude)", ylim=c(-3,1),
          main="GAM and quadratic GLM fitted to species data")
     plotvgam(fit1, se=TRUE, lcol="blue", scol="blue", add=TRUE, llwd=2)
     ## End(Not run)
     fit1@misc$dispersion   # dispersion parameter
     logLik(fit1)

     # Here, the dispersion parameter defaults to 1
     fit0 = vglm(agaaus ~ poly(a.5, 2), binomialff, hunua)
     fit0@misc$dispersion   # dispersion parameter

