cbpp                  package:lme4                  R Documentation

_S_e_r_o_l_o_g_i_c_a_l _I_n_c_i_d_e_n_c_e _o_f _C_o_n_t_a_g_i_o_u_s _B_o_v_i_n_e _P_l_e_u_r_o_p_n_e_u_m_o_n_i_a _i_n _E_t_h_i_o_p_i_a

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

     Contagious bovine pleuropneumonia (CBPP) is a major disease of
     cattle in Africa, caused by a mycoplasma.  This dataset describes
     the serological incidence of CBPP in zebu cattle during a
     follow-up survey implemented in 15 commercial herds located in the
     Boji district of Ethiopia.  The goal of the survey was to study
     the within-herd spread of CBPP in newly infected herds. Blood
     samples were quarterly collected from all animals of these herds
     to determine their CBPP status.  These data were used to compute
     the serological incidence of CBPP (new cases occurring during a
     given time period).  Some data are missing (lost to follow-up).

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

     data(cbpp)

_F_o_r_m_a_t:

     A data frame with 56 observations on the following 4 variables.

     '_h_e_r_d' A factor identifying the herd (1 to 15).

     '_i_n_c_i_d_e_n_c_e' The number of new serological cases for a given herd
          and time period.

     '_s_i_z_e' A numeric vector describing herd size at the beginning of a
          given time period.

     '_p_e_r_i_o_d' A factor with levels '1' to '4'.

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

     Serological status was determined using a competitive
     enzyme-linked immuno-sorbent assay (cELISA).

_S_o_u_r_c_e:

     Lesnoff, M., Laval, G., Bonnet, P., Abdicho, S., Workalemahu, A.,
     Kifle, D., Peyraud, A., Lancelot, R., Thiaucourt, F. (2004)
     Within-herd spread of contagious bovine pleuropneumonia in
     Ethiopian highlands. _Preventive Veterinary Medicine_ *64*, 27-40.

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

     ## response as a matrix
     (m1 <- lmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
                 family = binomial, data = cbpp))

     ## response as a vector of probabilities and usage of argument "weights"
     m2 <- lmer(incidence / size ~ period + (1 | herd), weights = size,
                family = binomial, data = cbpp)

     ## Confirm that these are equivalent:
     stopifnot(all.equal(coef(m1), coef(m2)),
               all.equal(ranef(m1), ranef(m2)))

