# Multi-Way ANOVA Model

## Bottler Example

### Run General Linear Model

Do StatANOVAGeneral Linear Model and fill in appropriate info in the main dialog box and sub dialog boxes:

#### Session Output

```General Linear Model: volume versus carbon, pressure, speed

Factor    Type   Levels  Values
carbon    fixed       3  10, 12, 14
pressure  fixed       2  25, 30
speed     fixed       2  200, 250

Analysis of Variance for volume, using Adjusted SS for Tests

carbon                  2  252.750  252.750  126.375  178.41  0.000
pressure                1   45.375   45.375   45.375   64.06  0.000
speed                   1   22.042   22.042   22.042   31.12  0.000
carbon*pressure         2    5.250    5.250    2.625    3.71  0.056
carbon*speed            2    0.583    0.583    0.292    0.41  0.671
pressure*speed          1    1.042    1.042    1.042    1.47  0.249
carbon*pressure*speed   2    1.083    1.083    0.542    0.76  0.487
Error                  12    8.500    8.500    0.708
Total                  23  336.625

S = 0.841625   R-Sq = 97.47%   R-Sq(adj) = 95.16%

Expected Mean Squares, using Adjusted SS

Expected Mean Square
Source                 for Each Term
1  carbon                 (8) + Q[1, 4 , 5 , 7]
2  pressure               (8) + Q[2, 4 , 6 , 7]
3  speed                  (8) + Q[3, 5 , 6 , 7]
4  carbon*pressure        (8) + Q[4, 7]
5  carbon*speed           (8) + Q[5, 7]
6  pressure*speed         (8) + Q[6, 7]
7  carbon*pressure*speed  (8) + Q[7]
8  Error                  (8)

Error Terms for Tests, using Adjusted SS

Synthesis
of Error
Source                 Error DF  Error MS  MS
1  carbon                    12.00     0.708  (8)
2  pressure                  12.00     0.708  (8)
3  speed                     12.00     0.708  (8)
4  carbon*pressure           12.00     0.708  (8)
5  carbon*speed              12.00     0.708  (8)
6  pressure*speed            12.00     0.708  (8)
7  carbon*pressure*speed     12.00     0.708  (8)

Estimated
Source      Value
Error      0.7083

Least Squares Means for volume

carbon*pressure    Mean  SE Mean
10     25         8.750   0.4208
10     30        10.250   0.4208
12     25        11.000   0.4208
12     30        14.000   0.4208
14     25        15.500   0.4208
14     30        19.250   0.4208
speed
200              12.167   0.2430
250              14.083   0.2430

Tukey 95.0% Simultaneous Confidence Intervals
Response Variable volume
All Pairwise Comparisons among Levels of speed
speed = 200  subtracted from:

speed  Lower  Center  Upper  -------+---------+---------+---------
250    1.168   1.917  2.665  (--------------*--------------)
-------+---------+---------+---------
1.50      2.00      2.50

Tukey Simultaneous Tests
Response Variable volume
All Pairwise Comparisons among Levels of speed
speed = 200  subtracted from:

speed    of Means  Difference  T-Value   P-Value
250         1.917      0.3436    5.578    0.0001

Tukey 95.0% Simultaneous Confidence Intervals
Response Variable volume
All Pairwise Comparisons among Levels of carbon*pressure
carbon = 10
pressure = 25  subtracted from:

carbon  pressure    Lower  Center   Upper
10      30        -0.4989   1.500   3.499
12      25         0.2511   2.250   4.249
12      30         3.2511   5.250   7.249
14      25         4.7511   6.750   8.749
14      30         8.5011  10.500  12.499

carbon  pressure  ---+---------+---------+---------+---
10      30          (----*----)
12      25            (----*----)
12      30                   (----*----)
14      25                       (----*----)
14      30                                (----*----)
---+---------+---------+---------+---
0.0       4.0       8.0      12.0

carbon = 10
pressure = 30  subtracted from:

carbon pressure  Lower Center  Upper  ---+---------+---------+---------+---
12     25       -1.249 0.7500  2.749  (----*----)
12     30        1.751 3.7500  5.749         (----*----)
14     25        3.251 5.2500  7.249             (----*----)
14     30        7.001 9.0000 10.999                       (---*----)
---+---------+---------+---------+---
0.0       4.0       8.0      12.0

carbon = 1
pressure = 25  subtracted from:

carbon pressure Lower Center  Upper  ---+---------+---------+---------+---
12     30       1.001  3.000  4.999        (---*----)
14     25       2.501  4.500  6.499           (----*----)
14     30       6.251  8.250 10.249                     (----*----)
---+---------+---------+---------+---
0.0       4.0       8.0      12.0

carbon = 12
pressure = 30  subtracted from:

carbon pressure   Lower Center Upper  ---+---------+---------+---------+---
14     25       -0.4989  1.500 3.499    (----*----)
14     30        3.2511  5.250 7.249             (----*----)
---+---------+---------+---------+---
0.0       4.0       8.0      12.0

carbon = 14
pressure = 25  subtracted from:

carbon pressure Lower Center Upper  ---+---------+---------+---------+---
14     30       1.751  3.750 5.749         (----*----)
---+---------+---------+---------+---
0.0       4.0       8.0      12.0

Tukey Simultaneous Tests
Response Variable volume
All Pairwise Comparisons among Levels of carbon*pressure
carbon = 10
pressure = 25  subtracted from:

carbon  pressure    of Means  Difference  T-Value   P-Value
10      30             1.500      0.5951    2.521    0.1925
12      25             2.250      0.5951    3.781    0.0246
12      30             5.250      0.5951    8.822    0.0000
14      25             6.750      0.5951   11.342    0.0000
14      30            10.500      0.5951   17.644    0.0000

carbon = 10
pressure = 30  subtracted from:

carbon  pressure    of Means  Difference  T-Value   P-Value
12      25            0.7500      0.5951    1.260    0.7999
12      30            3.7500      0.5951    6.301    0.0004
14      25            5.2500      0.5951    8.822    0.0000
14      30            9.0000      0.5951   15.123    0.0000

carbon = 12
pressure = 25  subtracted from:

carbon  pressure    of Means  Difference  T-Value   P-Value
12      30             3.000      0.5951    5.041    0.0030
14      25             4.500      0.5951    7.562    0.0001
14      30             8.250      0.5951   13.863    0.0000

carbon = 12
pressure = 30  subtracted from:

carbon  pressure    of Means  Difference  T-Value   P-Value
14      25             1.500      0.5951    2.521    0.1925
14      30             5.250      0.5951    8.822    0.0000

carbon = 14
pressure = 25  subtracted from:

carbon  pressure    of Means  Difference  T-Value   P-Value
14      30             3.750      0.5951    6.301    0.0004
```

#### Interaction Plot (fitted means) for volume

Since all factors are quantitative, we do trend analysis. Create columns for the orthogonal polynomial contrasts. To create Al and Aq, easiest way is to use DataCodeNumeric to numeric as in Orthogonal Polynomials in Minitab. The following gives example to create Aq.

Other contrasts can be created in like manner. Alternatively, you may use CalcCalculator to calculate these columns.
To get the product contrasts, use CalcCalculator:
Create AqBl likewise.

Now run a regression by doing StatRegressionRegression

Note that you're better off to do diagnostic checks by clicking on the `Options` and `Graphs` (and `Storage`) and select diagnostic tools to check for model adequacy.

#### Session Output

```Regression Analysis: volume versus Al, Aq, Bl, Cl, AlBl, AqBl

The regression equation is
volume = 13.1 + 3.94 Al + 0.312 Aq + 1.37 Bl + 0.958 Cl + 0.562 AlBl
- 0.062 AqBl

Predictor     Coef  SE Coef      T      P
Constant   13.1250   0.1657  79.19  0.000
Al          3.9375   0.2030  19.40  0.000
Aq          0.3125   0.1172   2.67  0.016
Bl          1.3750   0.1657   8.30  0.000
Cl          0.9583   0.1657   5.78  0.000
AlBl        0.5625   0.2030   2.77  0.013
AqBl       -0.0625   0.1172  -0.53  0.601

S = 0.811981   R-Sq = 96.7%   R-Sq(adj) = 95.5%

Analysis of Variance

Source          DF       SS      MS      F      P
Regression       6  325.417  54.236  82.26  0.000
Residual Error  17   11.208   0.659
Total           23  336.625

Source  DF   Seq SS
Al       1  248.062
Aq       1    4.687
Bl       1   45.375
Cl       1   22.042
AlBl     1    5.062
AqBl     1    0.187
```

Upon inspecting the results above (after passing reasonable diagnosis of the model), one may contemplate the model below

volume = 13.125 + 3.9375 P1A(x1) + 0.3125 P2A(x1)
+ 1.375 P1B(x2) + 0.9583 P1C(x3)
+ 0.5625 P1A(x1)P1B(x2)
10≤x1≤14, 25≤x2≤30, 200≤x3≤250.