ChickWeight             package:datasets             R Documentation

_W_e_i_g_h_t _v_e_r_s_u_s _a_g_e _o_f _c_h_i_c_k_s _o_n _d_i_f_f_e_r_e_n_t _d_i_e_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     The 'ChickWeight' data frame has 578 rows and 4 columns from an
     experiment on the effect of diet on early growth of chicks.

_U_s_a_g_e:

     ChickWeight

_F_o_r_m_a_t:

     This data frame contains the following columns:

     _w_e_i_g_h_t a numeric vector giving the body weight of the chick (gm).

     _T_i_m_e a numeric vector giving the number of days since birth when
          the measurement was made.

     _C_h_i_c_k an ordered factor with levels '18' < ... < '48' giving a
          unique identifier for the chick.  The ordering of the levels
          groups chicks on the same diet together and orders them
          according to their final weight (lightest to heaviest) within
          diet.

     _D_i_e_t a factor with levels 1,...,4 indicating which experimental
          diet the chick received.

_D_e_t_a_i_l_s:

     The body weights of the chicks were measured at birth and every
     second day thereafter until day 20.  They were also measured on
     day 21.  There were four groups on chicks on different protein
     diets.

_S_o_u_r_c_e:

     Crowder, M. and Hand, D. (1990), _Analysis of Repeated Measures_,
     {Chapman and Hall} (example 5.3)

     Hand, D. and Crowder, M. (1996), _Practical Longitudinal Data
     Analysis_, Chapman and Hall (table A.2)

     Pinheiro, J. C. and Bates, D. M. (2000) _Mixed-effects Models in S
     and S-PLUS_, Springer.

_E_x_a_m_p_l_e_s:

     require(stats)
     coplot(weight ~ Time | Chick, data = ChickWeight,
         type = "b", show = FALSE)
     ## fit a representative chick
     fm1 <- nls(weight ~ SSlogis( Time, Asym, xmid, scal ),
         data = ChickWeight, subset = Chick == 1)
     summary( fm1 )

