20.5 Nested Designs

Let $$\mu_{ij}$$ be the mean response when factor A is at the i-th level and factor B is at the j-th level.
If the factors are crossed, the jth level of B is the same for all levels of A.
If factor B is nested within A, the j-th level of B when A is at level 1 has nothing in common with the j-th level of B when A is at level 2.

Factors that can’t be manipulated are designated as classification factors, as opposed to experimental factors (i.e., you assign to the experimental units).

20.5.1 Two-Factor Nested Designs

• Consider B is nested within A.
• both factors are fixed
• All treatment means are equally important.

Mean responses

$\mu_{i.} = \sum_j \mu_{ij}/b$

Main effect factor A

$\alpha_i = \mu_{i.} - \mu_{..}$

where $$\mu_{..} = \frac{\mu_{ij}}{ab} = \frac{\sum_i \mu_{i.}}{a}$$ and $$\sum_i \alpha_i = 0$$

Individual effects of B is denoted as $$\beta_{j(i)}$$ where $$j(i)$$ indicates the j-th level of factor B is nested within the it-h level of factor A

$\beta_{j(i)} = \mu_{ij} - \mu_{i.} \\ = \mu_{ij} - \alpha_i - \mu_{..} \\ \sum_j \beta_{j(i)}=0 , i = 1,...,a$

$$\beta_{j(i)}$$ is the specific effect of the jth level of factor B nested within the ith level of factor A. Hence,

$\mu_{ij} \equiv \mu_{..} + \alpha_i + \beta_{j(i)} \equiv \mu_{..} + (\mu_{i.} - \mu_{..}) + (\mu_{ij} - \mu_{i.})$

Model

$Y_{ijk} = \mu_{..} + \alpha_i + \beta_{j(i)} + \epsilon_{ijk}$

where

• $$Y_{ijk}$$ response for the kth treatment when factor A is at the i-th level and factor B is at hte jth level (i = 1,..,a; j = 1,..,b; k = 1,..n)
• $$\mu_{..}$$ constant
• $$\alpha_i$$ constants subject to restriction $$\sum_i \alpha_i = 0$$
• $$\beta_{j(i)}$$ constants subject to restriction $$\sum_j \beta_{j(i)} = 0$$ for all i
• $$\epsilon_{ijk} \sim iid N(0,\sigma^2)$$

$E(Y_{ijk}) = \mu_{..} + \alpha_i + \beta_{j(i)} \\ var(Y_{ijk}) = \sigma^2$

there is no interaction term in a nested model

ANOVA for Two-Factor Nested Designs

Least Squares and MLE estimates

Parameter Estimator
$$\mu_{..}$$ $$\bar{Y}_{...}$$
$$\alpha_i$$ $$\bar{Y}_{i..} - \bar{Y}_{...}$$
$$\beta_{j(i)}$$ $$\bar{Y}_{ij.} - \bar{Y}_{i..}$$
$$\hat{Y}_{ijk}$$ $$\bar{Y}_{ij.}$$

residual $$e_{ijk} = Y_{ijk} - \bar{Y}_{ijk}$$

\begin{aligned} SSTO &= SSA + SSB(A) + SSE \\ \sum_i \sum_j \sum_k (Y_{ijk}- \bar{Y}_{...})^2 &= bn \sum_i (\bar{Y}_{i..}- \bar{Y}_{...})^2 + n \sum_i \sum_j (\bar{Y}_{ij.}- \bar{Y}_{i..})^2 + \sum_i \sum_j \sum_k (Y_{ijk} -\bar{Y}_{ij.})^2 \end{aligned}

ANOVA Table

Source of Variation SS df MS E(MS)
Factor A SSA a-1 MSA $$\sigma^2 + bn \frac{\sum \alpha_i^2}{a-1}$$
Factor B SSB(A) a(b-1) MSB(A) $$\sigma^2 + n \frac{\ | | | | um \sum e ta_{i)}^ 2}{a(b-1)}$$
Error SSE ab(n-1) MSE $$\sigma^2$$
Total SSTO abn -1

Tests For Factor Effects

$H_0: \text{ All } \alpha_i =0 \\ H_a: \text{ not all } \alpha_i = 0$

$$F = \frac{MSA}{MSE} \sim f_{(1-\alpha;a-1,(n-1)ab)}$$ reject if $$F > f$$

$H_0: \text{ All } \beta_{j(i)} =0 \\ H_a: \text{ not all } \beta_{j(i)} = 0$

$$F = \frac{MSB(A)}{MSE} \sim f_{(1-\alpha;a(b-1),(n-1)ab)}$$ reject $$F>f$$

Testing Factor Effect Contrasts

$$L = \sum c_i \mu_i$$ where $$\sum c_i =0$$

$\hat{L} = \sum c_i \bar{Y}_{i..} \\ \hat{L} \pm t_{(1-\alpha/2;df)}s(\hat{L})$

where $$s^2(\hat{L}) = \sum c_i^2 s^2(\bar{Y}_{i..})$$, where $$s^2(\bar{Y}_{i..}) = \frac{MSE}{bn}, df = ab(n-1)$$

Testing Treatment Means

$$L = \sum c_i \mu_{.j}$$ estimated by $$\hat{L} = \sum c_i \bar{Y}_{ij}$$ with confidence limits:

$\hat{L} \pm t_{(1-\alpha/2;(n-1)ab)}s(\hat{L})$

where

$s^2(\hat{L}) = \frac{MSE}{n}\sum c^2_i$

Unbalanced Nested Two-Factor Designs

If there are different number of levels of factor B for different levels of factor A, then the design is called unbalanced

The model

$Y_{ijk} = \mu_{..} + \alpha_i + \beta_{j(i)} + \epsilon_{ijk} \\ i = 1,2;j =1,..,b_i;k=1,..,n_{ij} \\ b_1 = 3, b_2= 2, n_{11} = n_{13} =2, n_{12}=1,n_{21} = n_{22} = 2\\ \sum_{i=1}^2 \alpha_i =0 \\ \sum_{j=1}^3 \beta_{j(1)} = 0 \\ \sum_{j=1}^2 \beta_{j(2)}=0$

where $$\alpha_1,\beta_{1(1)}, \beta_{2(1)}, \beta_{1(2)}$$ are parameters. And constraints: $$\alpha_2 = - \alpha_1, \beta_{3(1)}= - \beta_{1(1)}-\beta_{2(1)}, \beta_{2(2)}=-\beta_{1(2)}$$

4 indicator variables

$$$X_1 = \begin{cases} 1&\text{if obs from school 1}\\ -1&\text{if obs from school 2}\\ \end{cases}$$$

$$$X_2 = \begin{cases} 1&\text{if obs from instructor 1 in school 1}\\ -1&\text{if obs from instructor 3 in school 1}\\ 0&\text{otherwise}\\ \end{cases}$$$

$$$X_3 = \begin{cases} 1&\text{if obs from instructor 2 in school 1}\\ -1&\text{if obs from instructor 3 in school 1}\\ 0&\text{otherwise}\\ \end{cases}$$$

$$$X_4 = \begin{cases} 1&\text{if obs from instructor 1 in school 1}\\ -1&\text{if obs from instructor 2 in school 1}\\ 0&\text{otherwise}\\ \end{cases}$$$

Regression Full Model

$Y_{ijk} = \mu_{..} + \alpha_1 X_{ijk1} + \beta_{1(1)}X_{ijk2} + \beta_{2(1)}X_{ijk3} + \beta_{1(2)}X_{ijk4} + \epsilon_{ijk}$

Random Factor Effects

If

$\alpha_1 \sim iid N(0,\sigma^2_\alpha) \\ \beta_{j(i)} \sim iid N(0,\sigma^2_\beta)$

Mean Square Expected Mean Squares A fixed, B random Expected Mean Squares A random, B random
MSA $$\sigma^ 2 + n \sigma^2_\beta + bn \frac{\sum \alpha_i^2}{a-1}$$ $$\sigma^2 + bn \sigma^2_{\alpha} + n \sigma^2_\beta$$
MSB(A) $$\sigma^2 + n \sigma^2_\beta$$ $$\sigma^2 + n \sigma^2_\beta$$
MSE $$\sigma^2$$ $$\sigma^2$$

Test Statstics

Factor A $$\frac{MSA}{MSB(A)}$$ $$\frac{MSA}{MSB(A)}$$
Factor B(A) $$\frac{MSB(A)}{MSE}$$ $$\frac{MSB(A)}{MSE}$$

Another way to increase the precision of treatment comparisons by reducing variability is to use regression models to adjust for differences among experimental units (also known as analysis of covariance).