RCBD with Random Block Effects

The random effects analog of RCBD designs

Kris Sankaran true
10-07-2021

Readings 4.1, Rmarkdown

  1. As in standard random effects, sometimes the blocks are from a larger population. For example, in the medical device example, we care about a ``resin effect,’’ but don’t care about each individual batch.

  2. The model is setup as before,

\[ y_{ij} = \mu + \tau_i + \beta_j + \epsilon_{ij} \] except now both \(\beta_j \sim \mathcal{N}\left(0, \sigma_{\beta}^2\right)\) and \(\epsilon_{ij} \sim \mathcal{N}\left(0, \sigma^2\right)\), all independently.

  1. Observations are correlated within each block are correlated. The calculation to demonstrate this is similar to the one used to show that observations \(i\) within levels of an ordinary random effects model are correlated.

Hypothesis Testing

  1. We’re interested in whether any of the treatments have an effect,

\[\begin{align*} H_0 &: \tau_1 = \dots = \tau_a = 0 \\ H_{1} &: \tau_{i} \neq 0 \text{ for at least one } i \end{align*}\]

  1. We won’t show it, but it turns that \[\begin{align*} \mathbf{E}\left[MS_{\text{Treatment}}\right] &= \sigma^2 + \frac{b \sum_{i = 1}^{a} \tau_i^2}{a - 1} \\ \mathbf{E}\left[MS_{\text{Block}}\right] &= \sigma^2 + a \sigma^2_{\beta} \\ \mathbf{E}\left[MS_{E}\right] &= \sigma^2 \end{align*}\] so we should reject the null when \(MS_{\text{Treatment}}\) is much larger than \(MS_E\).

  2. In fact, as in the fixed block case, \[ \frac{MS_{\text{Treatment}}}{MS_{E}} \sim F\left(a - 1, \left(a - 1\right)\left(b - 1\right)\right) \] so we can use the same F-distribution cutoff when testing whether any treatment effects are nonzero.

Estimation

  1. As in random effects for the completely randomized design, we can use either the method of moments or maximum likelihood. The method of moments estimators are \[\begin{align*} \hat{\sigma} &= MS_{E} \\ \hat{\sigma}^2_{\beta} &= \frac{1}{a}\left[MS_{\text{Block}} - MS_{E}\right] \end{align*}\]

  2. Finding confidence intervals continues to be a challenge for the method of moments approach. In this case, maximum likelihood is preferred. This method is shown in the computer example accompanying these notes.

Code Example

  1. We’ll continue with the graft dataset. This reads in the data as in the previous notes.
library(readr)
library(tidyr)
graft <- read_table2("https://uwmadison.box.com/shared/static/0ciblk4z2f3k6zizbj4plg3q33w1d0n6.txt") %>%
  pivot_longer(-Pressure, names_to = "batch", values_to = "yield")
graft$Pressure <- as.factor(graft$Pressure)
  1. As with ordinary random effects ANOVA, we can fit an RCBD with random block effects using lmer. Notice that we only use the (1 | -) notation for the batch variable. This means that the batches are viewed as random but pressure is considered fixed. This is why in the summary output, we have a variance component \(\sigma^2_{\beta}\) for the batches, but separate fixed effects for across pressure levels.
library(lme4)
fit <- lmer(yield ~ Pressure + (1 | batch), data = graft)
fit
Linear mixed model fit by REML ['lmerMod']
Formula: yield ~ Pressure + (1 | batch)
   Data: graft
REML criterion at convergence: 112.0424
Random effects:
 Groups   Name        Std.Dev.
 batch    (Intercept) 2.789   
 Residual             2.707   
Number of obs: 24, groups:  batch, 6
Fixed Effects:
 (Intercept)  Pressure8700  Pressure8900  Pressure9100  
      92.817        -1.133        -3.900        -7.050