BIB                 package:SASmixed                 R Documentation

_D_a_t_a _f_r_o_m _a _b_a_l_a_n_c_e_d _i_n_c_o_m_p_l_e_t_e _b_l_o_c_k _d_e_s_i_g_n

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

     The 'BIB' data frame has 24 rows and 5 columns.

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

     This data frame contains the following columns:

     _B_l_o_c_k an ordered factor with levels '1' < '2' < '3' < '8' < '5' <
          '4' < '6' < '7'

     _T_r_e_a_t_m_e_n_t a treatment factor with levels '1' to '4'.

     _y a numeric vector representing the response

     _x a numeric vector representing the covariate

     _G_r_p a factor with levels '13' and  '24' 

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

     These appear to be constructed data.

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

     Littel, R. C., Milliken, G. A., Stroup, W. W., and Wolfinger, R.
     D. (1996), _SAS System for Mixed Models_, SAS Institute (Data Set
     5.4).

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

     str(BIB)
     if (require("lattice", quietly = TRUE, character = TRUE)) {
       xyplot(y ~ x | Block, BIB, groups = Treatment, type = c("g", "p"),
              aspect = "xy", auto.key = list(points = TRUE, space = "right",
              lines = FALSE))
     }
     if (require("lme4", quietly = TRUE, character = TRUE)) {
       options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
       ## compare with Output 5.7, p. 188
       print(fm1BIB <- lmer(y ~ Treatment * x + (1 | Block), BIB))
       print(anova(fm1BIB))     # strong evidence of different slopes
       ## compare with Output 5.9, p. 193
       print(fm2BIB <- lmer(y ~ Treatment + x : Grp + (1 | Block), BIB))
       print(anova(fm2BIB))
     }

