The random effects analog of RCBD designs
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.
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.
\[\begin{align*} H_0 &: \tau_1 = \dots = \tau_a = 0 \\ H_{1} &: \tau_{i} \neq 0 \text{ for at least one } i \end{align*}\]
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\).
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.
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*}\]
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.
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)
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.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