1 Introduction

A Randomized complete block design is a kind of two-factorial design which is based on the model:

$$\begin{aligned} y_{ijk}=\mu +\alpha _i+\beta _j+(\alpha \beta )_{ij}+e_{ijk} \end{aligned}$$
(1)
figure a

Depending on the chosen model, mean square errors include different kinds of variance components (Table 1).

Table 1. Variance components of mean square values in a two factorial design for different kind of models

\(\kappa \) depends on the side condition about interaction.

$$ \kappa = {\left\{ \begin{array}{ll} \text {cov} (ab_{ij},ab_{ij'})=0 &{} 1 \quad (j\ne j')\\ \sum _{i=1}^a ab_{ij}=0 &{} 0 \quad \forall \ j \end{array}\right. } $$

As one may see from Table 1 a test on main effects in a fixed model is based on the error term, in a random model on interaction mean squares and in the mixed model approach either on the error term or the interaction term (depending on the definition of \(\kappa \)).

In the follow this article focuses primarily on fixed models or mixed models where \(\kappa =0\).

Several authors tried to find a solution for testing interaction in block designs. A short selection of these models can be found below.

1.1 Tukey’s Test

The first one who proposed a block model which includes interaction was [12].

$$ y_{ij} = \mu + \alpha _i + \beta _j + \lambda \times \alpha _i\times \beta _j + e_{ij} $$

\(\lambda \quad \dots \quad \) interaction parameter

Here the interaction term is bound to the height of the factor levels which is a very strong restriction. [11] showed that Tukey’s test can be derived as a test of \(H_0: \lambda = 0\).

1.2 Johnson and Graybill’s Test

Another solution to the problem of interactions in block designs is given by the following model [5]:

$$y_{ij} = \mu + \alpha _i + \beta _j + \varPhi \times \xi _i\times \eta _j + e_{ij}$$

Limitations to interaction are not that strict as with Tukey’s model, but some additional assumptions have to be made (\(\sum _{i=1}^a {\xi _i=0,}\ \sum _{j=1}^b \eta _j=0,\ \sum _{i=1}^a \xi _i^2=1,\ \sum _{j=1}^b \eta _j^2=1\)).

1.3 Mandel’s Test

[7] assumes a systematic type of row column interaction. The underlying “Mandel-row” model is given by

$$ y_{ij}=\mu + \alpha _i + \beta _j + \gamma _i\times \beta _j+e_{ij} $$

\(\gamma _j \quad \dots \quad \) interaction parameter depending on row i

Other models including non-linear interaction effects can be found by [2, 4, 8, 9] and [10].

2 Deriving Sum of Squares for Error Term and Interaction in Block Designs

Deriving sum of squares and mean squares in a block model is based on a common two-factorial design.

2.1 Sum of Squares in Two Factorial Designs

The sum of squares value for interaction in case of a balanced design can be calculated as

$$ SS_{AB}=n\sum _{i=1}^a\sum _{j=1}^b(\bar{x}_{ij.}-\bar{x}_{i..}-\bar{x}_{.j.}+\bar{x}_{...})^2. $$

with \((a-1)(b-1)\) number of degrees of freedom.

The sum of squares value for the error term is given by

$$ SS_{E}=\sum _{i=1}^a\sum _{j=1}^b\sum _{k=1}^n(x_{ijk}-\bar{x}_{ij.})^2. $$

with \(ab(n-1)\) number of degrees of freedom.

In block designs the number of observations (n) for each combination of a factor level and a block is equal to 1. It follows, that:

  • \(\bar{x}_{ij.}\) for each combination of factor and block levels is identical to \(x_{ij1}\).

  • degree of freedom for the error sum of squares becomes zero.

  • \(MS_E = \frac{SS_E}{df_E}\) can not be estimated.

In the follow we the mean square value for interaction (\(MS_{AB}=\frac{SS_{AB}}{df_{AB}}\)) serves as an error term – assuming, that no interaction effects exist. That’s a very daring assumption, since almost all tow-factorial experiments show interactions (no matter whether significant or not).

2.2 Separating Error from Interaction in Block Designs

In a two factorial design the following restrictions are usually assumed in regard to interaction:

  • The sum of all interaction effects within a block is equal to zero (\(\sum _{i=1}^a (\alpha \beta )_{ij}=0 \qquad \forall j\quad j=\ 1,\dots ,b\)).

  • The sum of all interaction effects within a certain factor level is equal to zero (\(\sum _{j=1}^b (\alpha \beta )_{ij}=0 \qquad \forall i\quad i=\ 1,\dots ,a\)).

To separate the error term from interaction we may look at a Latin square like block design (Fig. 1)

Fig. 1.
figure 1

Block plan and corresponding interaction terms in a Latin square like block design

Looking at Fig. 1, there is obviously no reason why one should not restrict the sum of interaction effects within a column block to zero, too

$$\begin{aligned} \sum _{i=1,j=1}^{a,b}(\alpha \beta )_{ij^k}=0 \qquad \forall k\quad k=\ 1,\dots ,c. \end{aligned}$$
(2)

Using this restriction has some important implications:

  • Within a column block all levels of a factor are included exactly one time. As a common restriction \(\sum _{i=1}^a \alpha _i=0\). So the mean value of a column block does not include any factor effects.

  • In Latin Square like block designs a column block comprises all levels of blocks. Usually it is assumed, that these effects sum up to zero (\(\sum _{j=1}^b \beta _j=0\)). So the mean value of a column block does not include any block effects.

As a consequence of these two last restrictions and of restriction 2 the mean value of a column block encloses only some error effects besides \(\mu \). This enables us to separate error variance and interaction variance by calculating the sum of squares for column blocks.

$$\begin{aligned} SS_{column\ block}=SS_{E}=a\sum _{k=1}^c(\bar{x}_{c_k}-\bar{x}_{..})^2 \end{aligned}$$
(3)

The error sum of squares for the error term (\(SS_{E^*}\)) in a common block design actually is the sum of squares value for interaction. So the difference zu \(SS_E\) obviously gives the sum of squares for interaction.

$$\begin{aligned} SS_{AB}=SS_{E^*}-SS_E \end{aligned}$$
(4)

or alternatively \(SS_{AB}=SS_T-SS_A-SS_B-SS_E\).

Degrees of freedom are defined as:

$$\begin{aligned} df_E= & {} c-1\ = b-1\\ df_{AB}= & {} df_T-df_A-df_B-df_E\ =\ (a-2)(b-1) \end{aligned}$$

Mean squares are calculated the usual way:

$$ MS_E=SS_E/df_E,\qquad MS_{AB}=SS_{AB}/df_{AB}$$

Until now we restricted or model to a Latin Square design. The method as such can be applied to any kind of block design. Figure 2 depicts interaction terms in a 5\(\,\times \,\)2 block design.

Fig. 2.
figure 2

Interaction terms in an arbitrary block design

Within a column block all levels of the interesting factor are included. By definition, the sum of all interaction effects within a column block is zero. The number of block effects however is different. For example, the first column block of Fig. 2 contains 2 times the effect of the first and 3 times the effect of the second block. Since we can estimate these block effects using the block means, we are able to correct for this biased column block.

3 Illustrative Example

The example in Fig. 3 shows a block design [A] with 3 blocks and 4 factor levels.

Based on the experimental design 3 column blocks were defined [B]. Each column block comprises every level of factor A. So their effects sum up to zero. Interaction effects within each column block sum up to zero too, but block effects do not, as in every column block a different number of block effects is included. So we have to correct for these effects. To do this, we need to calculate block means, factor level means, uncorrected column block means and the overall mean.

Fig. 3.
figure 3

Illustrative example including experimental design and corresponding measurements [A] and defined column blocks with interaction effects [B].

3.1 Calculation of Column Block Means

Each uncorrected column block mean includes a specific block effect several times (e.g. The first column block \(C_1\) includes 2 times block effect 3, \(C_2\) includes 2\(\times \) block effect 2, \(C_3\) includes 2\(\times \) block effect 1). So we have to correct this additional block effects. The effect of a block can be calculated as the difference between the block mean and the overall mean.

If we want to calculate the mean of \(C_1\) we have reduce the sum for this column block by the effect of block 3, to get an unbiased estimator. The effect of block 3 is calculated es the difference between \(\bar{x}_{B_3}-\bar{\bar{x}}\). So an unbiased estimation of column block 1 for the example given above can be calculated based on the sum of this column block and the effect size of block 3 (\(ef_{B_3}\)) as this is included in the sum for this column block.

uncorrected sum: \(\sum _{j=1}^{n}x_{1j}\ =\ 8+5+9+5\ =\ 27\)

effect size block 3: \(ef_{B_3}\ =\ \bar{x}_{B_3}-\bar{\bar{x}}\ =\ 6.5-7.0\ =\ -0.5\)

corrected sum: \(\sum _{j=1}^{n}x_{1j}-ef_{B_3}\ =\ 27-(-0.5)\ =\ 27.5\)

corrected mean: \(\bar{x}_{C_1}\ =\ \frac{\sum _{j=1}^{n_f}x_{1j}-ef_{B_3}}{n_{f}}\ =\ \frac{27.5}{4}\ =\ 6.875\)

Similarly, we can derive all other correction factors and column block means.

3.2 Calculation of Sum of Squares and Degrees of Freedom

Sum of squares for blocks, factors, total and the (uncorrected) error is calculated the usual way and can be done with any statistical package for a common block design.

Sum of squares for the error term is calculated by the corrected column block means:

$$\begin{aligned} SS_E\ =\ n_f \sum _{k=1}^{n_cb} (\bar{x}_{cb_k} -\bar{\bar{x}})^2\ =\ 4((6.875-7.0)^2+(7.000-7.0)^2+(7.125-7.0)^2)\ =\ 0.125 \end{aligned}$$

From evaluating a common block design we get \(SS_E^* = 9.\overline{3}\). As mentioned above this actually includes possible interaction effects. By subtracting \(SS_E\) from \(SS_{E^*}\) we find the sum of squares value for interaction.

$$ SS_{IA} = SS_E^* - SS_E = 9.\overline{3} - 0.125\ =\ 9.208\overline{3} $$

Degrees of freedom for factor, block and total are those of a common block design. Degrees of freedom for main effects and interaction effects are calculated as follows:

$$ \begin{array}{rcl@{}rcl} df_E &{}=&{} c-1=b-1 &{} 3 - 1 &{}=&{} 2\\ df_{AB} &{}=&{} df_E^* - df_E &{} 6 - 2 &{}=&{} 4\\ &{}=&{} (a - 2) (b - 1) &\quad{} (4 - 2)(3 - 1) &{}=&{} 4 \end{array} $$

3.3 ANOVA Table

Based on calculations for a common block design and those of 3.2 we find results as shown in an ANOVA Table 2.

Table 2. Example of analysis of variance for the interaction model in compare to that of a common block model

As can be seen from Table 2, separating interaction from the error of the common block model dramatically changes the result. If interaction is possible or can be expected, it should be included in the model regardless of whether it is significant or not.

4 Simulations

To get an idea about the power of the interaction model several simulations were performed. A Fortran program (as well as a SAS macro and a R script) was developed to calculate ANOVA results for both the interaction model as well as for the common block model. Simulation were based on 100000 runs each.

Fig. 4.
figure 4

Empirical power of the test on interaction as a function of the standard deviation of interaction for different sized Latin Square like block designs (\(\sigma _{E}=1\)).

Figure 4 illustrates the empirical power of a test on interaction in \(3\times 3\) to \(7\times 7\) Latin Square like block designs. The standard deviation for this effect varied from 0 to 4 in steps of 0.5. The standard deviation for the error term (\(\sigma _E\)) was held constant and set to 1. As one would expect the power increases if sample size increases too. Thus, for example the power for the test on interaction in \(7\times 7\) design is about 92% if the standard deviation of the interaction is twice as high as that of the error (99.9% if it is three times as high). Whereas power in a 3\(\,\times \,\)3 design is about 58% respectively 84%.

Fig. 5.
figure 5

Empirical power of the test on the main effect as a function of the standard deviation of this effect for 3\(\,\times \,\)3 and 7\(\,\times \,\)7 different Latin Square like block designs (\(\sigma _E=1\)).

In block analysis one is primarily interested in the test regarding the main effect. Figure 5 displays the power for a \(3\times 3\) and \(7\times 7\) Latin Square like block design. Four different standard deviations for interaction were taken into account (\(\sigma _{AB}=1,2,3,4\)). If there is no interaction the power for the common block analysis is highest (dashed curve). In this situation the interaction model is over parameterized and thus its power decreases. Whereas in those situations where the standard deviation of the interaction corresponds at least to that of the error, the interaction model (solid line) is best in most cases.

In addition, Fig. 5 shows another unwanted effect for the common block model. Depending on the level of interaction, there is a certain range in which it is impossible for the common block model to find any significant result for the main effect (although one awaits at least \(\alpha \)% of significant cases even in the absence of any influences).

Results for \(5\times 3\) and \(7\times 4\) block designs in regard to the main effect are presented in Fig. 6. Again common block analysis is best in those situations were no interaction exists. Depending on the size of interaction the power of the interaction model gets more and more superior. Contrary to statistical theory, type I error rate is zero (although it should be \(\alpha \)) in many situations where interaction exists and the main effect is low.

Fig. 6.
figure 6

Empirical power of the test on the main effect as a function of the standard deviation of this effect for different block designs (\(\sigma _E=1\)).

5 Estimating Variance Components

The method described here is based on fixed effect model reps. a model with a special definition of interaction (Table 1, \(\kappa =0\)). In this case we can estimate the Least Squares (LSQ) variance component for interaction as

$$ \begin{array}{ll} MS_{AB}=\sigma ^2+n\sigma _{ab}^2&{}\qquad \sigma ^2\equiv MS_E\\[3mm] \sigma _{ab}^2=\frac{MS_{AB}-MS_E}{n}&{}\\[2mm] \end{array} $$

In block-designs:

$$n=1 \quad \Longrightarrow \quad \sigma _{ab}^2=MS_{AB}-MS_E$$

A usual assumption in estimating variance components of interaction based on restricted maximum likelihood (REML) estimation is \(\text {cov} (ab_{ij},ab_{ij'})=0, (j\ne j')\) In Fig. 7 both methods are compared for different heights of variance components of interaction (\(\sigma ^2_{ab}\)) in compare to the error variance (\(\sigma ^2\)).

Fig. 7.
figure 7

Comparison of REML and LSQ estimation of variance components for interaction assuming \(\sigma ^2_{ab}=\sigma ^2\) ([A]) and \(\sigma ^2_{ab}=9\sigma ^2\) ([B])

As long as the variance component for interaction is similar to the of the error variance, there is almost no difference between different estimation methods. In 7 the height of the variance component for interaction is 9 time as high as that of the error variance. Even in this rather extreme situation the differences between LSQ and REML estimation is negligible with at least 6 blocks and 6 levels of the factor. This means the proposed method can be used to estimate variance components in any mixed and random effects model approach with an appropriate sample size.

6 Conclusions

The method presented here allows for testing interaction in different kind of block designs. It can also be used for estimating variance components of interaction and main effects for mixed and random effect models in block designs. There are some additional advantages in compare to other methods:

  • It is based on a linear model and as such comprises all previously developed non linear models.

  • It is very easy to use and any statistical package like SAS, R, SPSS can be used with just a few simple additional calculations.

  • There are no uncommon restrictions.

  • It can be used not only for common block designs or Latin Squares, but for any statistical model that has a suitable block structure as for instance Split-Plot Designs or maybe even incomplete block designs (although one has to use least-square means here).

  • The power of the method is good in respect to interaction and even more for the main effect, if interaction exists.

Block analysis is based on at least a two factorial design (Table 1). Depending on the model (fixed, random, mixed) main effects are tested against either the error sum of squares or that of the interaction. For a fixed and a special kind of mixed effects models (Table 1, \(\kappa =0\)) an assessment of the main and block effect must be made by means of the error. In all other situations you have to test against means squares of the interaction. Interaction itself always has to be tested against the error.

So far, means squares for the error term were not or only available under the very restrictive assumptions of non linear models. With the method presented here this test now is possible even in a random or mixed effect surrounding (Table 1, \(\kappa =1\)). Although the basic assumption (\(\kappa =1\)) is different to that of the fixed model, it doesn’t really matter for estimating variance components.