splitbin                 package:aod                 R Documentation

_S_p_l_i_t_s _B_i_n_o_m_i_a_l _D_a_t_a _i_n_t_o _B_e_r_n_o_u_l_l_i _D_a_t_a

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

     Splits binomial data (n, y) and optional covariates into Bernoulli
     data (0 or 1) and the corresponding covariates.

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

       splitbin(formula, data, id = "id")
       

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

 formula: A formula: its left-hand side must be of the form 'cbind(y, n
          - y)' where the modelled  probability is 'y/n'. The
          right-hand side indicates the covariates which are considered
          in the ungrouped  data set.

    data: A data frame where all the variables described in 'n', 'y'
          and 'formula' are found.

      id: An optional character string naming the identifier (=
          grouping factor). Default to "id".

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

     Each line (with n > 0) of the initial data set generates n lines
     in the final data set with the same  covariate pattern, plus an
     identifier (named "id", by default). The value of this identifier
     is the row  name from which it was expanded in the initial data
     set.

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

     A data frame with response and covariates as indicated in the
     formula, plus the identifier.

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

       data(orob1)
       splitbin(cbind(y, n - y) ~ 1, orob1)
       splitbin(cbind(y, n - y) ~ dilution, orob1)
       

