Two-way ANOVA (Two-Factor Analysis of Variance)

  Two-way Analysis of Variance (two-factor or bidimensional ANOVA) allows comparison of within-group and between-group variances for two sources of variation in a randomized block design.
  The 2ANAVA1matrix program computes statistical quantities including p-values for a two-way ANOVA (blocks). As in previous programs, data input is performed using a single matrix (column vectors only).

1 Files:

  1. 2ANAVA1matrix program and example
  2. Program source code

2 Usage and example

# Input:
1. Data matrix (column vectors);
2. "2ANAVA1matrix"

# Output:
1. sqtr: treatment sum of squares;
2. sqb: block sum of squares;
3. sqt: total sum of squares;
4. qmtr: treatment mean square;
5. qmb: block mean square;
6. qmr: residual mean square;
7. Ftr: Snedecor’s F value for treatments;
8. Fbl: Snedecor’s F value for blocks;
9. p: p-value for treatments;
10. pbl: p-value for blocks;
11. R2: coefficient of determination of the model.


  The compressed file includes an example from a randomized experimental trial (Vieira, 2000, p. 81).


(a) Insertion of data matrix.
(b) Results obtained from the two-way ANOVA.
Figure 1: 2ANAVA1matrix program running on the Android version of the HP50G calculator (Go49gp), showing data input and example results.


  The obtained results are identical to those reported in the reference source (Vieira, 2000).

3 References:

  1. Vieira, Sônia. Analysis of Variance: ANOVA. Atlas Publishing, 2000.
Back to top