BIB: Data from a balanced incomplete block design

Description Format Details Source Examples

Description

The BIB data frame has 24 rows and 5 columns.

Format

This data frame contains the following columns:

Block

an ordered factor with levels 1 < 2 < 3 < 8 < 5 < 4 < 6 < 7

Treatment

a treatment factor with levels 1 to 4.

y

a numeric vector representing the response

x

a numeric vector representing the covariate

Grp

a factor with levels 13 and 24

Details

These appear to be constructed data.

Source

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).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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))
}

Example output

'data.frame':	24 obs. of  5 variables:
 $ Block    : Factor w/ 8 levels "1","2","3","4",..: 1 1 1 2 2 2 3 3 3 4 ...
 $ Treatment: Factor w/ 4 levels "1","2","3","4": 1 2 3 1 2 4 1 3 4 2 ...
 $ y        : num  31 29 31 29 34 33 31 28 34 39 ...
 $ x        : num  20 18 11 37 37 39 29 12 31 37 ...
 $ Grp      : Factor w/ 2 levels "13","24": 1 2 1 1 2 2 1 1 2 2 ...
 - attr(*, "ginfo")=List of 7
  ..$ formula     :Class 'formula'  language y ~ x | Block
  .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
  ..$ order.groups: logi TRUE
  ..$ FUN         :function (x)  
  ..$ outer       : NULL
  ..$ inner       : NULL
  ..$ labels      : list()
  ..$ units       : list()
Linear mixed model fit by REML ['lmerMod']
Formula: y ~ Treatment * x + (1 | Block)
   Data: BIB
REML criterion at convergence: 104.8945
Random effects:
 Groups   Name        Std.Dev.
 Block    (Intercept) 4.272   
 Residual             1.096   
Number of obs: 24, groups:  Block, 8
Fixed Effects:
 (Intercept)    Treatment1    Treatment2    Treatment3             x  
    22.36784       4.42949      -0.43737       6.27864       0.44255  
Treatment1:x  Treatment2:x  Treatment3:x  
    -0.22377       0.05338      -0.17918  
Analysis of Variance Table
            Df  Sum Sq Mean Sq  F value
Treatment    3  23.447   7.816   6.5110
x            1 136.809 136.809 113.9693
Treatment:x  3  18.427   6.142   5.1168
Linear mixed model fit by REML ['lmerMod']
Formula: y ~ Treatment + x:Grp + (1 | Block)
   Data: BIB
REML criterion at convergence: 99.177
Random effects:
 Groups   Name        Std.Dev.
 Block    (Intercept) 4.304   
 Residual             1.019   
Number of obs: 24, groups:  Block, 8
Fixed Effects:
(Intercept)   Treatment1   Treatment2   Treatment3      x:Grp13      x:Grp24  
    20.9452       5.3414       1.1356       8.1810       0.2395       0.4892  
Analysis of Variance Table
          Df  Sum Sq Mean Sq F value
Treatment  3  23.424   7.808  7.5236
x:Grp      2 154.733  77.367 74.5471

SASmixed documentation built on May 1, 2019, 9:18 p.m.