Randomized Complete Block Design (RCBD)

Today’s goals

Explore key concepts in RCBD:

  1. Heterogeneous experimental material
  2. Treatment randomization
  3. The effects model
  4. The ANOVA table

Motivational example - Treatment design

  • 2-way factorial
  • N fertilizer rates: 0, 100, 200 kg N/ha
  • K fertilizer rates: 0, 30, 60 kg K/ha
  • 3 x 3 = 9 treatment combinations

Experimental design

Assuming we have heterogeneous experimental material (e.g., different soil type, topography, etc.)

  • Thus, we should use a randomized complete block design (RCBD)

Treatment randomization - RCBD

  • Randomization of a treatment to a EU is restricted.

  • In an RCBD, each treatment appears once in each block.

  • Because of that, randomization needs to be performed for each block individually.

In our motivational example:

  • 4 replicates

  • Total observations: 9 x 4 = 36 EUs

Heterogeneous Experimental Material - RCBD

In the plot layout here, all treatments (1 through 9) were randomly assigned to any experimental unit (plot) within each block.

Heterogeneous Experimental Material - RCBD

  • Treatment 1 and its replicates are highlighted.

  • Note how, due to the restricted randomization, treatment 1 appears only once in every block.

Heterogeneous Experimental Material - RCBD

Since the experimental material is heterogeneous (e.g., different soil texture class), we are safeguarding statistical power when estimating treatment means and performing comparisons. 👍

The effects model

\[ y_{ijk} = \mu + \rho_{k} + \alpha_{i} + \beta_{j} + \alpha\beta_{ij} + e_{ijk} \]

  • \(y_{ijk}\) is the observation on the kth block from ith N rate and jth K rate
  • \(\mu\) is the overall mean 
  • \(\rho_{k}\) is the differential effect of kth block
  • \(\alpha_{i}\) is the differential effect of ith N rate
  • \(\beta_{j}\) is the differential effect of jth K rate
  • \(\alpha\beta_{ij}\) is the differential effect of the combination of the ith N rate and ith K rate
  • \(e_{ijk}\) is the residual corresponding to the block k of N rate i and K rate j.

The ANOVA table

In the following ANOVA table…

  • n is number of levels in N rate = 3
  • k is number of levels in K rate = 3
  • r is number of blocks = 4
  • N is total number of obserevations or EUs = 3 x 3 x 4 = 36

The ANOVA table

library(dplyr)
library(flextable)

Attaching package: 'flextable'
The following object is masked from 'package:purrr':

    compose
tribble(~`Source of variation`,~`df`,~SS,~MS,~`F ratio`,
        #"Overall mean", "1", NA_character_, NA, NA,
        "Block", "dfb =\nr - 1 =\n4 - 1 = 3", "SSb", "", "",
        "N rate", "dfn =\nn - 1 =\n3 - 1 = 2", "SSn", "MSn =\nSSn / dfn ", "MSn / MSe",
        "K rate", "dfk =\nk - 1 =\n3 - 1 = 2", "SSk", "MSk =\nSSk / dfk", "MSk / MSe",
        "N x K", "dfnk =\n(n - 1) x (k - 1) =\n(3-1) x (3-1) = 4", "SSnk", "MSnk =\nSSnk / dfnk", "MSnk / MSe",
        "Error", "dfe =\n(ab - 1) x (r - 1) =\n(9 - 1) x (4 - 1) =\n8 x 3 = 24", "SSe", "MSe =\nSSe / dfe", "",
        "TOTAL", "dft =\nN -1 = 35", "SSt", "", ""
        ) %>%
  regulartable() %>%
  fontsize(size = 16, part = "all") %>%
  border_inner_h(part="all") %>%
  autofit()

Source of variation

df

SS

MS

F ratio

Block

dfb =
r - 1 =
4 - 1 = 3

SSb

N rate

dfn =
n - 1 =
3 - 1 = 2

SSn

MSn =
SSn / dfn

MSn / MSe

K rate

dfk =
k - 1 =
3 - 1 = 2

SSk

MSk =
SSk / dfk

MSk / MSe

N x K

dfnk =
(n - 1) x (k - 1) =
(3-1) x (3-1) = 4

SSnk

MSnk =
SSnk / dfnk

MSnk / MSe

Error

dfe =
(ab - 1) x (r - 1) =
(9 - 1) x (4 - 1) =
8 x 3 = 24

SSe

MSe =
SSe / dfe

TOTAL

dft =
N -1 = 35

SSt

  #knitr::kable()
  • Notice how now we consumed extra 3 dfs to calculate the block effect.
  • With that, we have 3 fewer dfs in the error df.

ANOVA table - motivational example

library(car)
Loading required package: carData

Attaching package: 'car'
The following object is masked from 'package:dplyr':

    recode
The following object is masked from 'package:purrr':

    some
library(emmeans)
library(multcomp)
Loading required package: mvtnorm
Loading required package: survival
Loading required package: TH.data
Loading required package: MASS

Attaching package: 'MASS'
The following object is masked from 'package:dplyr':

    select

Attaching package: 'TH.data'
The following object is masked from 'package:MASS':

    geyser
# data
df_all <- read_csv("../../../../../../2-Teaching/2024 CRSS 8030 - Data Science and Statistical Programming Applied to Ag/03_crd/data/wheat_nk_balkh.csv") %>%
    mutate(rep = factor(rep),
         nrate_kgha = factor(nrate_kgha),
         krate_kgha = factor(krate_kgha)
         )  %>%
  dplyr::select(rep, trt, nrate_kgha, krate_kgha, yield_kgha)
Rows: 36 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
dbl (5): trt, rep, nrate_kgha, krate_kgha, yield_kgha

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# lm
options(contrasts = c("contr.sum", "contr.poly"))

lm2w <- lm(yield_kgha ~ rep + nrate_kgha*krate_kgha,
           data = df_all)

Anova(lm2w, type = 3) %>%
  as.data.frame() %>%
  rownames_to_column(var = "Source of variation") %>%
  mutate(`Pr(>F)` = ifelse(`Pr(>F)` < 0.001, 
                           "<0.001",
                           round(`Pr(>F)`,3))) %>%
  regulartable() %>%
  fontsize(size = 20, part = "all") %>%
  #border_inner_h(part="all") %>%
  autofit()

Source of variation

Sum Sq

Df

F value

Pr(>F)

(Intercept)

836,829,184.0

1

2,223.1503963

<0.001

rep

2,747,393.1

3

2.4329410

0.09

nrate_kgha

1,491,078.2

2

1.9806258

0.16

krate_kgha

470,445.5

2

0.6249012

0.544

nrate_kgha:krate_kgha

11,107,585.3

4

7.3772023

<0.001

Residuals

9,033,981.9

24

  • What is significant here (say at \(\alpha = 0.05\))?

  • What can we say about the rep/block effect?

Summary

  • RCBD is randomized with one restriction (each block separately)
  • Each term of the effects model has a row in the ANOVA table
  • By including the block in the model, it consumed dfs from error
  • In a properly conducted RCBD, we would hope that the amount of SS explained by block is relatively greater than the consequence of consuming 3 df from the error to calculate the block effect.