Which Two-Way Model to Use?

If it can be justified that two factors do not interact or previous experiments show no-interaction results, then the two-way main-effects model shall be employed. It has more power in detection the significant differences among the main-effects of either factor. If such an justification does not exisit, one shall employ the two-way complete model.

Sample Sizes

There are different ways or purposes to determine the sample size for each treatment. For example, we might want the simultaneous confidence intervals to be bounded by a some width. In this case, we need to have an upper bound for \(msE\), that can be obtained by using a confidence upper limit for \(\sigma^2\) is a pilot experiment is available. Then we can calculate the width given a sample size. Increase the sample size until the targeted width is achieved.

Another way is determine the sample size is for the \(F\)-test to detect a targeted difference among the main effects of \(A\) or \(B\) with certain power.

Note

\[ \begin{align} SSA&=b r \sum_{i=1}^a\left(\bar{Y}_{i . .}-\bar{Y}_{\ldots}\right)^2\\ &=b r \sum_{i=1}^a\left(\underbrace{(\bar{Y}_{i . .}-\bar{\mu}_{i\cdot\cdot})-(\bar{Y}_{\ldots}-\bar{\mu}_{\cdot\cdot\cdot})}_{\xi_i}+(\bar{\mu}_{i\cdot\cdot}-\bar{\mu}_{\cdot\cdot\cdot})\right)^2\\ &=br\sum_{i=1}^a \xi_i^2+br\sum_{i=1}^a(\bar{\mu}_{i\cdot\cdot}-\bar{\mu}_{\cdot\cdot\cdot})^2+2br\sum_{i=1}^a \xi_i (\bar{\mu}_{i\cdot\cdot}-\bar{\mu}_{\cdot\cdot\cdot}) \end{align} \] Since \(E(\xi_i)=0\), we have \[ \text{E}(SSA)=br\text{E}\left(\sum_{i=1}^a \xi_i^2 \right)+br\sum_{i=1}^a(\bar{\mu}_{i\cdot\cdot}-\bar{\mu}_{\cdot\cdot\cdot})^2\\ =(a-1)\sigma^2+\delta^2\sigma^2 \] where \(\delta^2=br\sum_{i=1}^a(\bar{\mu}_{i\cdot\cdot}-\bar{\mu}_{\cdot\cdot\cdot})^2/\sigma^2\) is the noncentrality parameter. When we want to detect a difference \(\Delta\) among the main-effects of \(A\), we consider the scenario when the maximum \(\bar{\mu}_{i\cdot\cdot}\) is \(c+\Delta\) and the minimum \(\bar{\mu}_{i\cdot\cdot}\) is \(c\) and all other \(\bar{\mu}_{i\cdot\cdot}\) lie in the middle. In this case, \[ \delta^2=\frac{br \Delta^2}{2 \sigma^2}. \] Then the power for detecting a difference of \(\Delta\) among the main effects of \(A\) using a significance level \(\alpha\) is

\[ P(F_{nc}>F_{a-1, df, \alpha}) \] where \(F_{nc}\) is a random variable that has the non-central \(F\)-distribution with the first degrees of freedom (a-1) and the second degrees of freedom \(df\) being the degrees of freedom for the error term in the ANOVA table. Specifically, \(df=abr-ab\) for the two-way complete model and \(df=abr-a-b+1\) in the two-way main-effects model.

It would require \(\sigma^2\) be known. We can use the 90% confidence upper limit if a pilot study is available or use an educated guess for the upper bound of \(\sigma^2\).

Example 1 Suppose we use a completely randomized design with two factors A (with 4 levels) and B (with 3 levels) and employ a two-way complete model. We would like to detect a difference of 8 among the main effects of \(A\) using the \(F\) test with a significance level \(\alpha=0.05\). How large the sample size needs to be in order for the F-test to reject the null hypothesis with a probability/power 0.9? Assume \(\sigma=5\) or \(\sigma^2=25\).

SAS code below. \(r=5\) is sufficient.

data samplesize;
input r@@;
a=4;
b=3;
diff=8;
sigma=5;
alpha=0.05;
df1=a-1;
df2=a*b*(r-1);
ncp=b*r*diff**2/(2*sigma**2);
Falpha=finv(1-alpha, df1, df2);
power=1-probf(Falpha, df1, df2, ncp);
lines;
4 5 6 7 8
;
proc print;
var r power;
run;

Example 2 With the same setting of experiment as in Example 1, we now have additional knowledge that the two factors do not interact. We will employ the two-waym main-effects model. How large should the sample size be in order to achieve the same power?

SAS code below. The only change is the \(df2\).

data samplesize;
input r@@;
a=4;
b=3;
diff=8;
sigma=5;
alpha=0.05;
df1=a-1;
df2=a*b*r-a-b+1;
ncp=b*r*diff**2/(2*sigma**2);
Falpha=finv(1-alpha, df1, df2);
power=1-probf(Falpha, df1, df2, ncp);
lines;
4 5 6 7 8
;
proc print;
var r power;
run;

Experiments with One Observation Per Treatment

Analysis

In this case, the two-way main-effects model can be applied if it is believed that there are no interaction effects. However, the two-way complete model cannot be analyzed in the usual way because the degrees of freedom for the \(AB\) is 0.

However, if it is known or can be justified that some interaction effects do not exist, it is still possible to test the remaining interaction effects. Read Section 6.7.2 for more detail and an example.

Tukey’s Test for Additivity

Tukey’s test for additivity uses only 1 degree of freedom and can be applied when there each treatment has no replicates. Note it assumes that the interaction terms have a particular form \((\alpha\beta)_{ij}=\gamma \alpha_i\beta_j\). One can verify that this form satisfies the requirements for interaction effects.

The model is therefore as follows:

\[ Y_{ij}=\mu+\alpha_i+\beta_j +\gamma \alpha_i\beta_j+\epsilon_{ij}, \\ i=1, 2, \ldots, a, j=1, 2, \ldots, b, \\ \epsilon_{ij} ~i.i.d \sim N(0, \sigma^2) \]

It tests the following null hypothesis: \(H_0\): \(\gamma=0\) versus \(H_a:\), \(\gamma\ne 0\).

It is carried out as follows. Define

\[ \begin{aligned} S SA & \equiv b \sum_i\left(\bar{Y}_{i .}-\bar{Y}_{. .}\right)^2 \\ S SB & \equiv a \sum_j\left(\bar{Y}_{\cdot j}-\bar{Y}_{. .}\right)^2 \\ S SA B & \equiv \frac{\left(\sum_{i j} Y_{i j}\left(\bar{Y}_{i .}-\bar{Y}_{. .}\right)\left(\bar{Y}_{\cdot j}-\bar{Y}_{. .}\right)\right)^2}{\sum_i\left(\bar{Y}_{i .}-\bar{Y}_{. .}\right)^2 \sum_j\left(\bar{Y}_{\cdot j}-\bar{Y}_{. .}\right)^2} \\ S STotal & \equiv \sum_{i j}\left(Y_{i j}-\bar{Y}_{. .}\right)^2 \\ S S_E & \equiv S STotal-S SA-S SB-S S{A B} \end{aligned} \] Then use the following test statistic

\[ \frac{SSAB/ 1}{SSE/(ab-a-b)} \] that has the \(F_{1, ab-a-b}\) distribution.

Although this is an F-test, it is derived in a different way as we did to the \(F\)-tests previously.