Anova Models — Unit8:PartialSolutions 1 of 8

8.1.1.For your convenience the breaking strength measurements in the table above have been repeated below, reading across each row of the table. Put them into c1 of a Minitab worksheet; label it PSI. Then use the patterned data feature to make subscript columns c2 and c3 for A and B, respectively. What "pattern codes" can be used to generate these columns? Finally, look in the worksheet or print it out to verify that its rows contain the information shown at the top of the next page.

The following procedures make the required data and subscript columns:

Cut/Paste the three rows of data into c1-c10 of a Minitab worksheet, using the spaces as delimiters.

MTB > name c11 'PSI' c12 'Formula' c13 'Batch'

MTB > rowtoc c1-c10 c11;

SUBC> subs c12.

MTB > set c13

DATA> 3(1:5)2

DATA> end

We have not discussed the command rowtoc before ("rows to columns"). Look at MTB > help rowtoc.

Alternatively, after pasting the data into c1-c10 as above, do the following.

MTB > name c14 'PSqI' c15 'Form' c16 'Bat'

MTB > stack c1-c10 c14

MTB > set c15

DATA> 10(1:3)

DATA> end

MTB > set c16

DATA> (1:5)6

DATA> end

Depending on which method you use, the order of the breaking strength observationsdown c11 (or c14) will be different, but the subscripts will correctly identify the cell of the table from which each observation came. Thus the results of the next problem will be the same either way.

8.1.2.Use Minitab to make a table similar to the one shown above. Also make a table that shows the means for each cell, row, and column.

MTB > table 'Formula' 'Batch';
SUBC> data 'PSI'.
Tabulated statistics: Formula, Batch
Rows: Formula Columns: Batch
1 2 3 4 5
1 613 656 648 637 602
631 637 638 637 585
2 591 618 575 614 545
591 613 608 591 534
3 583 641 641 625 597
609 617 634 639 566
Cell Contents: PSI : DATA / MTB > table 'Formula' 'Batch';
SUBC> mean 'PSI'.
Tabulated statistics: Formula, Batch
Rows: Formula Columns: Batch
1 2 3 4 5 All
1 622.0 646.5 643.0 637.0 593.5 628.4
2 591.0 615.5 591.5 602.5 539.5 588.0
3 596.0 629.0 637.5 632.0 581.5 615.2
All 603.0 630.3 624.0 623.8 571.5 610.5
Cell Contents: PSI : Mean

8.1.3.Make box plots or dot plots of these data broken out by Formula. Even though these plots do not account for the fact that the data come from five different batches of concrete, do they suggest that one capping formula may result in beams that are significantly stronger (or weaker) than the others? Is there any evidence of outliers or skewness among the observations for any of the Formulas?

MTB > gstd

MTB > dotp 'PSI';

MTB > by 'Formula'.

Dotplot: PSI by Formula

Formula :

1 . . . . : . .

+------+------+------+------+------+------PSI

Formula .

2 . . . : . ...

+------+------+------+------+------+------PSI

Formula .

3 ...... :

+------+------+------+------+------+------PSI

525 550 575 600 625 650

There is some indication that Formula 2 may produce weaker beams. There is no evidence here of outliers or severe skewness that would interfere with doing an ANOVA procedure on these data, but we will still want to look at residuals after doing an ANOVA as a final check of assumptions.

MTB > gpro[Minitab starts in GPRO mode. Command necessary only if GSTD has been used previously.]

MTB > boxplot PSI * Formula


Notice that Minitab's boxplots do not signal any outliers. The long lower whisker for Formula 2 might indicate left skewness if we had more observations. (Boxplots do not give any indication how many observations there are.)

Also, there does not seem to be much difference in the variability of observations from one formula to another.

8.1.4.Based on graphical displays similar to those in the previous problem, does it seem that there is significant variability among the batches?

MTB > dotp PSI * Batch[In GPRO mode.]


There seems to be considerable batch to batch variability. For example, points for Batches 2 and 5 do not overlap.

8.2.1.Look at the interaction plot that has Batches on the horizontal axis, so that there are three broken-line traces representing the three capping formulas. If you had to guess just from looking at this plot, would you say that there is significant interaction? If interaction were significant, would it be disorderly with respect to the Formula effect? If the Formula effect is significant, which capping formula appears to be "best"?

There is some indication that interaction may be significant because the three broken-line paths in the plot mentioned in the question are far from parallel. (In that plot, especially the line for Formula 2 seems different from the rest.) In the plot with levels of Formula on the horizontal axis, some of the lines cross—but only barely. However, remember that the vertices (black dots) in these plots are averages of only two random observations. Nonparallel lines and even slight crossings of traces might just be due to randomness. Formal F tests will tell.

8.2.2.(a) Because we are interested in the randomly chosen batches only as a possible source of variability, we will not be interested in determining specific patterns of differences among the batches, even if the Batch effect turns out to be significant. But use the profile plot with Formulas on the horizontal axis to speculate whether some Batches seem to produce stronger (weaker) beams than others.

There does seem to be large variability among Batches. In particular, Batch 5 in this experiment seems to be especially bad.

(b)If the Formula effect turns out to be significant, is there a formula that seems better (or worse) than the others?

In the profile plots there is a fairly strong indication that Formula 2 may be worse than the others. In the plot with Batches on the horizontal axis, the path for Formula 2 is consistently below the other two paths. In the other plot, the five paths are all V-shaped, with Formula 2 consistently at the bottom of the V.

8.2.3.Suppose that you were given the 15 cell means rather than the 30 individual observations. Write the model you would use to analyze the results.

The model using the 15 cell means as data would have n = 1, a = 3, b = 5. Since n = 1, there are only two subscripts, and the model cannot have an interaction term: Yijk = µ + αi + Bj + eij, for i = 1, 2 ,3 and j = 1,2, ..., 5. This model is also subject to the restriction that ii= 0, and the distributional assumptions that Bj are iid N(0, B) and eij are iid N(0, ).

If we tried to put in an interaction term (B)ij, it would have the same subscripts as the error term. Minitab would give an error message if we tried to include an interaction term in the model for the anova procedure.

8.3.1.Look at the normal probability plot of the residuals. What is your interpretation? What is the P-value of the Anderson-Darling test for normality?

The probability plot for the residuals (included as an optional "Graph" in menus, is as follows:

The residuals fall approximately in a straight line. The Anderson-Darling P-value of .637 indicates that the null hypothesis of normality cannot be rejected at the 5% significance level.

(Also a plot of residuals against fits, omitted here, does not show any marked tendency towards heteroscedasticity.)

8.3.2.Because Interaction is not significant one could remove the interaction term from the ANOVA model before testing the main effects. (a) What happens to the df for Interaction when you "pool" in this fashion? What is the correct "error term" for testing the main effects in this model?

The interaction term is pooled with the error term to create a new error term. The DFs are added so that the pooled ANOVA has DF(Error) = 8 + 15 = 23. [Also the SSs are added to give SS(Error) = 1329.2 + 2648.0 = 4040.2.] The error term for both main effects is Error. The pooled ANOVA table is shown below.

Source DF SS MS F P

Formula 2 8487.5 4243.7 24.16 0.000

Batch 4 13983.8 3496.0 19.90 0.000

Error 23 4040.2 175.7

Total 29 26511.5

(b) Use a calculator to perform Tukey's HSD procedure to determine the pattern of differences among Formulas. Use the "pooled" MS(Error) and df(Error) in your computations. Recall that each Formula mean is based on 10 observations. Verify your results using Tukey comparisons in Minitab's general linear models (GLM) procedure.

HSD = 3.54[175.7/10]1/2 = 14.84.

The Tukey 95% CIs from Minitab's glm procedure are shown below.

Tukey 95.0% Simultaneous Confidence Intervals

Response Variable PSI

All Pairwise Comparisons among Levels of Formula

Formula = 1 subtracted from:

Formula Lower Center Upper ------+------+------+------

2 -55.24 -40.40 -25.56 (----*---)

3 -28.04 -13.20 1.64 (----*----)

------+------+------+------

-30 0 30

Formula = 2 subtracted from:

Formula Lower Center Upper ------+------+------+------

3 12.36 27.20 42.04 (----*----)

------+------+------+------

-30 0 30

These CIs all have the same length: 2(LSD) = 29.68; also, for example, | –55.24 –(–25.56) | = 29.68.

From Problem 8.1.2 we can get the order of the means and make the underline diagram: 2 3 1 . This agrees with our interpretation of the graphics displays in earlier problems.

Now we show the LSD procedure for the full model (not requested): HSD = 4.04[174.0/10]1/2 = 16.85, using interaction as the error term for Formula. (Notice, from below, agreement with Minitab glm: for example, 44.05 – 27.20 = 16.85.)

Tukey 95.0% Simultaneous Confidence Intervals

Response Variable PSI

All Pairwise Comparisons among Levels of Formula

Formula = 1 subtracted from:

Formula Lower Center Upper ------+------+------+------

2 -57.25 -40.40 -23.55 (-----*----)

3 -30.05 -13.20 3.65 (-----*----)

------+------+------+------

-30 0 30

Formula = 2 subtracted from:

Formula Lower Center Upper ------+------+------+------

3 10.35 27.20 44.05 (-----*-----)

------+------+------+------

-30 0 30

Underline diagram same as for reduced model.

8.3.3.Perform the ANOVA including the interaction term, but specifying the restricted model. What important difference (from the unrestricted model) in the formation of F-ratios is implied by Minitab's EMS table?

The ANOVA and EMS tables for the restricted model are as follows:

ANOVA: PSI versus Formula, Batch

Factor Type Levels Values

Formula fixed 3 1, 2, 3

Batch random 5 1, 2, 3, 4, 5

Analysis of Variance for PSI

Source DF SS MS F P

Formula 2 8487.5 4243.7 24.39 0.000

Batch 4 13983.8 3495.9 19.80 0.000

Formula*Batch 8 1392.2 174.0 0.99 0.484

Error 15 2648.0 176.5

Total 29 26511.5

S = 13.2866 R-Sq = 90.01% R-Sq(adj) = 80.69%

Expected Mean Square

Variance Error for Each Term (using

Source component term restricted model)

1 Formula 3 (4) + 2 (3) + 10 Q[1]

2 Batch 553.236 4 (4) + 6 (2)

3 Formula*Batch -1.254 4 (4) + 2 (3)

4 Error 176.533 (4)

The difference between the restricted and unrestricted version of the analysis is that the interaction term appears in the EMS(Batch) in the unrestricted model, but not in the restricted model. Thus, in the restricted model the
F-statistic for Batch has MS(Error) is in the denominator. In contrast, the unrestricted model has MS(Formula*Batch) in the denominator.

8.3.4.Suppose that the 30 observations given at the beginning of this unit were collected exactly in order reading across the rows of the original data table, with Formula 1 tests being run on Monday, Formula 2 on Tuesday, and Formula 3 on Wednesday. Furthermore, suppose that on each of these days the Day shift ran Batch 1, the Swing shift ran Batches 2, 3, and 4, and the Night shift ran Batch 5. What effect would this knowledge have on the report you would write about your conclusions from the experiment?

This would be really bad news. Because there was no random assignment of treatment combinations to days or shifts, we can't tell whether apparent differences in Formulas might really have had something to do with days (perhaps humidity or temperature, or condition of the test equipment), and we can't tell if apparent variability in batches might really reflect a variability in how different shifts do their work.

The time series plot below shows that the lowest values for each Formula were reported by the night shift (Batch 5). Also the measurements on Tuesday (Formula 2) tend to be lower.

8.3.5.Suppose that the beams that produced the values 613 and 656 in the first two cells with Formula 1 had been damaged in handling so that these two values are missing. Further suppose that for each of the cells in Batch 3 a third beam was tested with results: 649, 612, 614 for Formulas 1, 2, 3, respectively. How would you analyze the resulting unbalanced design? Do the missing and extra observations change the overall interpretation of the results?

The unbalanced design can be analyzed using the glm model—unrestricted.

General Linear Model: PSI_1 versus Formula_1, Batch_1

Factor Type Levels Values

Formula_1 fixed 3 1, 2, 3

Batch_1 random 5 1, 2, 3, 4, 5

Analysis of Variance for PSI_1, using Adjusted SS for Tests

Source DF Seq SS Adj SS Adj MS F P

Formula_1 2 7964.8 7264.9 3632.4 22.93 0.000 x

Batch_1 4 13732.6 13234.8 3308.7 21.00 0.000 x

Formula_1*Batch_1 8 1256.1 1256.1 157.0 0.84 0.579

Error 16 2977.8 2977.8 186.1

Total 30 25931.4

x Not an exact F-test.

S = 13.6424 R-Sq = 88.52% R-Sq(adj) = 78.47%

Unusual Observations for PSI_1

Obs PSI_1 Fit SE Fit Residual St Resid

2 631.000 631.000 13.642 0.000 * X

4 637.000 637.000 13.642 0.000 * X

15 575.000 598.333 7.876 -23.333 -2.09 R

R denotes an observation with a large standardized residual.

X denotes an observation whose X value gives it large influence.

Expected Mean Squares, using Adjusted SS

Source Expected Mean Square for Each Term

1 C22 (4) + 1.9048 (3) + Q[1]

2 C23 (4) + 1.9625 (3) + 5.8875 (2)

3 C22*C23 (4) + 2.0015 (3)

4 Error (4)

Error Terms for Tests, using Adjusted SS

Source Error DF Error MS Synthesis of Error MS

1 C22 10.57 191.1 0.9516 (3) + 0.0484 (4)

2 C23 8.99 180.7 0.9805 (3) + 0.0195 (4)

3 C22*C23 16.00 535.5 (4)

Variance Components, using Adjusted SS

Estimated

Source Value

C23 288.3

C22*C23 -180.8

Error 535.5

Although the F-tests are indicated to be "approximate" due to the unbalanced design, the conclusions that both the Formula and Batch factors are significant at the 5% level (P-values of 0.000 for both) and the interactions are not significant (P-value = .579) are the same as for the original data.

8.4.1.Compare two-way ANOVA tables for fixed, mixed, and random models. Which of the following columns are unchanged, regardless of which factors are declared as random: DF, SS, MS, F?

Only the F ratios are affected by the fixed/random declaration. (Also, only the F-ratios are affected by the distinction between restricted and unrestricted models.)

8.4.2.In Problem 8.3.3 we saw that, for the mixed model, Minitab's F-ratios are different depending on whether the restricted model is declared or whether the default unrestricted model is used. Is there a similar difference in F-ratios for the two-way model with both effects random?

No.

8.4.3.Same as problem 8.4.2, but consider both effects to be fixed? First, use the unrestricted model and then the restricted model, showing EMS tables in both cases. Comment on similarities and differences. Which EMS table agrees with what is shown in O/L 6e, Table 17.17, p1057?

Restriction makes no difference in F-ratios. (There are notational differences in the EMS table, but not ones that affect F-ratios). O/L 6e uses only unrestricted models.

8.4.4.For the data in this unit, the most fundamental interpretation has been the same whether with the true story (mixed model), or with the two imaginary scenarios (both fixed, both random): Interaction is not significant, A-effect highly significant, and B-effect highly significant. Thus, with these data an untrained "statistician" who does not know the difference between fixed and random effects would get the same results for the three F-tests no matter which model he or she happened to choose. Under what circumstances might the results of these F-tests depend on getting the correct model? (Of course, the interpretation of profile plots, use of multiple comparison procedures for significant main effects, and explanation of the findings would depend on knowing the difference between fixed and random effects in any case.)

If the interaction were significant, then there could be a large difference between MS(Formula*Batch) and MS(Error). Since the denominator of the F-ratios are either MS(Formula*Batch) or MS(Error), depending upon whether the factors are random or fixed, the incorrect designation could have an important effect on the F ratio and, thus, on conclusions about the significance of the factors. (Of course, changing the term in the denominator may also change the denominator df, so it is not just the size of the F-ratio that matters.)

8.4.5. Carefully write the models with both factors fixed (restricted) and both factors random (where the issue of restriction does not arise). Show the equation (using Greek letters for parameters and Latin letters for random variables), ranges of subscripts, restrictions (as appropriate), and distributional assumptions.

Both fixed; Yijk =  + i + j + ()ij + eijk; i = 1, 2, 3, j = 1, ..., 5; k = 1,2. ii = jj = i ()ij = j ()ij = 0.

eijk iid NORM(0, ).

Both random: Yijk =  + Ai + Bj + (AB)ij + eijk; i = 1, 2, 3, j = 1, ..., 5; k = 1,2.

Ai ~ NORM(0, A), Bj ~ NORM(0, B), (AB)ij ~ NORM(0, B), eijk ~ NORM(0, ), all mutually independent.

Based on notes by Elizabeth Ellinger, Spring 2004, as expanded and modified by Bruce E. Trumbo, 2005-08. Copyright © 2005, 2008 by Bruce E. Trumbo. All rights reserved.