24.4 Nested Designs

A nested design occurs when one factor is entirely contained within another. This differs from a crossed design, where all levels of one factor are present across all levels of another factor.

  • Crossed Design: If Factor B is crossed with Factor A, then each level of Factor B appears at every level of Factor A.
  • Nested Design: If Factor B is nested within Factor A, then each level of Factor B is unique to a particular level of Factor A.

Thus, if Factor B is nested within Factor A:

  • Level 1 of B within A = 1 has nothing in common with

  • Level 1 of B within A = 2.

Types of Factors

  • Classification Factors: Factors that cannot be manipulated (e.g., geographical regions, subjects).
  • Experimental Factors: Factors that are randomly assigned in an experiment.

24.4.1 Two-Factor Nested Design

We consider a nested two-factor model where:

  • Factor A has a levels.

  • Factor B is nested within Factor A, with b levels per level of A.

  • Both factors are fixed.

  • All treatment means are equally important.


The mean response at level i of Factor A:

μi.=1bjμij

The main effect of Factor A:

αi=μi.μ..

where:

μ..=1abijμij=1aiμi.

with the constraint:

iαi=0

The nested effect of Factor B within A is denoted as βj(i), where:

βj(i)=μijμi.=μijαiμ..

with the restriction:

jβj(i)=0,i=1,,a

Since βj(i) is the specific effect of the j-th level of factor B nested within the i-th level of factor A, the full model can be written as:

μij=μ..+αi+βj(i)

or equivalently:

μij=μ..+(μi.μ..)+(μijμi.)


The statistical model for a two-factor nested design is:

Yijk=μ..+αi+βj(i)+ϵijk

where:

  • Yijk = response for the k-th observation when:

    • Factor A is at level i.

    • Factor B (nested within A) is at level j.

  • μ.. = overall mean.

  • αi = main effect of Factor A (subject to: iαi=0).

  • βj(i) = nested effect of Factor B within A (subject to: jβj(i)=0 for all i).

  • ϵijkiidN(0,σ2) = random error.

Thus, the expected value and variance are:

E(Yijk)=μ..+αi+βj(i)var(Yijk)=σ2

Note: There is no interaction term in a nested model, because Factor B levels are unique within each level of A.


The least squares and maximum likelihood estimates:

Parameter Estimator
μ.. ˉY...
αi ˉYi..ˉY...
βj(i) ˉYij.ˉYi..
ˆYijk ˉYij.

The residual error:

eijk=YijkˉYij.


The total sum of squares (SSTO) is partitioned as:

SSTO=SSA+SSB(A)+SSE

where:

ijk(YijkˉY...)2=bni(ˉYi..ˉY...)2+nij(ˉYij.ˉYi..)2+ijk(YijkˉYij.)2


24.4.1.1 ANOVA Table for Nested Designs

Source of Variation SS df MS E(MS)
Factor A SSA a1 MSA σ2+bnα2ia1
Factor B (A) SSB(A) a(b1) MSB(A) σ2+nβ2j(i)a(b1)
Error SSE ab(n1) MSE σ2
Total SSTO abn1

24.4.1.2 Tests For Factor Effects

  • Factor A:

    F=MSAMSB(A)F(a1,a(b1))

    Reject H0 if F>f(1α;a1,a(b1)).

  • Factor B within A:

    F=MSB(A)MSEF(a(b1),ab(n1))

    Reject H0 if F>f(1α;a(b1),ab(n1)).


24.4.1.3 Testing Factor Effect Contrasts

A contrast is a linear combination of factor level means:

L=ciμi,whereci=0

The estimated contrast:

ˆL=ciˉYi..

The confidence interval for L:

ˆL±t(1α/2;df)s(ˆL)

where:

s2(ˆL)=c2is2(ˉYi..),wheres2(ˉYi..)=MSEbn,df=ab(n1)


24.4.1.4 Testing Treatment Means

For treatment means, a similar approach applies:

L=ciμ.j,ˆL=ciˉYij

The confidence limits for L:

ˆL±t(1α/2;(n1)ab)s(ˆL)

where:

s2(ˆL)=MSEnc2i


24.4.2 Unbalanced Nested Two-Factor Designs

When Factor B has different levels for different levels of Factor A, the design is unbalanced.

Yijk=μ..+αi+βj(i)+ϵijk2i=1αi=0,3j=1βj(1)=0,2j=1βj(2)=0

where:

  • Factor A: i=1,2.

  • Factor B (nested in A): j=1,,bi.

  • Observations: k=1,,nij.

Example case:

  • b1=3,b2=2 (Factor B has different levels for A).

  • n11=n13=2,n12=1,n21=n22=2.

  • Parameters: α1,β1(1),β2(1),β1(2).

Constraints:

α2=α1,β3(1)=β1(1)β2(1),β2(2)=β1(2)


The unbalanced design can be modeled using indicator variables:

  1. Factor A (School Level): X1={1if observation from school 11if observation from school 2

  2. Factor B (Instructor within School 1): X2={1if observation from instructor 1 in school 11if observation from instructor 3 in school 10otherwise

  3. Factor B (Instructor within School 1): X3={1if observation from instructor 2 in school 11if observation from instructor 3 in school 10otherwise

  4. Factor B (Instructor within School 1): X4={1if observation from instructor 1 in school 11if observation from instructor 2 in school 10otherwise

Using these indicator variables, the full regression model is:

Yijk=μ..+α1Xijk1+β1(1)Xijk2+β2(1)Xijk3+β1(2)Xijk4+ϵijk

where X1,X2,X3,X4 represent different factor effects.


24.4.3 Random Factor Effects

If factors are random:

α1iidN(0,σ2α)βj(i)iidN(0,σ2β)


Expected Mean Squares for Random Effects

Mean Square Expected Mean Squares (A Fixed, B Random) Expected Mean Squares (A Random, B Random)
MSA σ2+nσ2β+bnα2ia1 σ2+bnσ2α+nσ2β
MSB(A) σ2+nσ2β σ2+nσ2β
MSE σ2 σ2

F-Tests for Factor Effects

Factor F-Test (A Fixed, B Random) F-Test (A Random, B Random)
Factor A MSAMSB(A) MSAMSB(A)
Factor B(A) MSB(A)MSE MSB(A)MSE

Another way to increase precision in treatment comparisons is by adjusting for covariates using regression models. This is called Analysis of Covariance (ANCOVA).

Why use ANCOVA?

  • Reduces variability by accounting for covariate effects.

  • Increases statistical power by removing nuisance variation.

  • Combines ANOVA and regression for more precise comparisons.