Stata FAQ: How can I test for nonadditivity in a randomized block ANOVA in Stata?

Randomized block ANOVA models assume additive block and treatment
effects, that is, that there is no treatment by block interaction. Tukey’s test for nonadditivity
is a one degree of freedom test of the hypothesis that there is a linear treatment by linear block
interaction. The **nonadd** command
can be added to your Stata system by installing the **nonadd.ado** program written by
ATS. You can download the **nonadd **command by
typing **search nonadd **(see
How can I use the search command to search for programs and get additional
help? for more information about using **search)**.

Now, let’s read in an example dataset,
**rb4a**, which is adapted from Kirk (1982, 2nd Edition).
This example has eight subjects with four repeated measures on each subject.

use https://stats.idre.ucla.edu/stat/stata/faq/rb4a, clear

Let’s look at a table of the data.

table s a, contents(mean y)----------+----------------------- | a s | 1 2 3 4 ----------+----------------------- 1 | 3 4 7 7 2 | 6 5 8 8 3 | 3 4 7 9 4 | 3 3 6 8 5 | 1 2 5 10 6 | 2 3 6 10 7 | 2 4 5 9 8 | 2 3 6 11 ----------+-----------------------

Now let’s compute the randomized block ANOVA.

anova y a sNumber of obs = 32 R-squared = 0.8790 Root MSE = 1.16496 Adj R-squared = 0.8214 Source | Partial SS df MS F Prob > F -----------+---------------------------------------------------- Model | 207.00 10 20.70 15.25 0.0000 | a | 194.50 3 64.8333333 47.77 0.0000 s | 12.50 7 1.78571429 1.32 0.2914 | Residual | 28.50 21 1.35714286 -----------+---------------------------------------------------- Total | 235.50 31 7.59677419

Next, we’ll do the test for nonadditivity. Note that the variables are entered the same way as for the randomized block analysis.

nonadd y a sTukey's test of nonadditivity for randomized block designs F (1,20) = 7.8345468 Pr > F: .01108091

In this case the test for nonadditivity was statistically significant, the data are nonadditive.

Here is a second example, **rb4b**, this time from Kirk’s 3rd edition. Again,
it has eight subjects with four repeated measures on each subject.

use https://stats.idre.ucla.edu/stat/stata/faq/rb4b, clear table s a, contents(mean y)----------+----------------------- | a s | 1 2 3 4 ----------+----------------------- 1 | 3 4 4 3 2 | 2 4 4 5 3 | 2 3 3 6 4 | 3 3 3 5 5 | 1 2 4 7 6 | 3 3 6 6 7 | 4 4 5 10 8 | 6 5 5 8 ----------+-----------------------anova y a sNumber of obs = 32 R-squared = 0.7318 Root MSE = 1.18523 Adj R-squared = 0.6041 Source | Partial SS df MS F Prob > F -----------+---------------------------------------------------- Model | 80.50 10 8.05 5.73 0.0004 | a | 49.00 3 16.3333333 11.63 0.0001 s | 31.50 7 4.50 3.20 0.0180 | Residual | 29.50 21 1.4047619 -----------+---------------------------------------------------- Total | 110.00 31 3.5483871nonadd y a sTukey's test of nonadditivity for randomized block designs F (1,20) = 1.2795813 Pr > F: .27135918

This time the test for nonadditivity was not significant, that is, there is no indication of a treatment by block interaction.

References:

- Kirk, R. (1982).Experimental Design: Procedures for the Behavioral Sciences. 2nd edition.
- Kirk, R. (1995).Experimental Design: Procedures for the Behavioral Sciences. 3rd edition.