STA 6166 UNIT 3 Section 2 Answers
 Welcome < Begin < Section 2 < Unit 3 Section 2 Answers

# Engineering

1. Using the data and analysis from the previous exercise (Unit 3 Section 1), perform a multiple comparison analysis, with experimentwise Type I error rate of 0.05, using each of the following procedures:
1. Fisher's LSD
2. Student-Newman-Keuls
3. Tukey's W
4. Duncan's MCP
5. Waller-Duncan
2. If you transformed the data prior to the analysis of variance, the multiple comparison procedures should be performed on the transformed data as well.
3. Using these same data, test the contrast where t=1 for Machine_C, t=2 for Machine_B, t=3 for Machine_A.

We continue using SAS to answer this question. We will perform the analysis on the square root transformed diameters. The SAS program which performs these calculations can be found here. You can run the program to get the output. Here we will only show part of the output. Note, you can attempt to compute these by hand and compare your results with the results below. Note also that the analysis is performed on the square-root transformed values, not the original values. We always perform the multiple comparison procedures on the values on which the original analysis of variance was performed.

The SAS program to do the full analysis is given here.

```proc glm data=shield;
class machine;
model sdia = machine /solution;
means machine / hovtest=bartlett;
means machine / hovtest=bf ;
/*Perform multiple comparison tests*/
means machine / LSD SNK Tukey duncan waller ;
/* Test requested contrast */
contrast "l1" machine -.5 -.5 1 ;
/* Output residuals and predicted values */
output out=outdia r=rdia p=pdia;
title1 'Problem 8.30,page 424 Ott and Longnecker';
title2 'Square Root transformed response';
footnote '';
run;
```
```

Printout from SAS GLM

Problem 8.30,page 424 Ott and Longnecker
Square Root transformed response

The GLM Procedure
Waller-Duncan K-ratio t Test for sdia

NOTE: This test minimizes the Bayes risk under additive loss and other assumptions.

Kratio                              100
Error Degrees of Freedom             17
Error Mean Square              4.627549   <- From AOV
F Value                            4.48   <- From AOV
Critical Value of t             2.18066   <- From Waller Table
Minimum Significant Difference   2.7083   <- From equation
Harmonic Mean of Cell Sizes           6   <- since sample sizes are unequal use this for n.

NOTE: Cell sizes are not equal.

Means with the same letter are not significantly different.

Waller Grouping
Mean      N    machine

A         5.949     10    c
B    A         3.575      5    b
B              2.700      5    a

t Tests (LSD) for sdia

NOTE: This test controls the Type I comparisonwise error rate,
experimentwise error rate.

Alpha                            0.05
Error Degrees of Freedom           17
Error Mean Square            4.627549
Critical Value of t           2.10982    <- From Table 2
Least Significant Difference   2.6204    <- From Equation
Harmonic Mean of Cell Sizes         6    <- since sample sizes are unequal use this for n.

NOTE: Cell sizes are not equal.

Means with the same letter are not significantly different.

t Grouping      Mean      N    machine

A         5.949     10    c
B    A         3.575      5    b
B              2.700      5    a

Duncan's Multiple Range Test for sdia

NOTE: This test controls the Type I comparisonwise error rate,
experimentwise error rate.

Alpha                           0.05
Error Degrees of Freedom          17
Error Mean Square           4.627549
Harmonic Mean of Cell Sizes        6

NOTE: Cell sizes are not equal.

Number of Means          2          3
Critical Range       2.620      2.749    <- From equation use q = 2.98, 3.13 of Duncan Table

Means with the same letter are not significantly different.

Duncan
Grouping        Mean      N    machine

A         5.949     10    c
B    A         3.575      5    b
B              2.700      5    a

Student-Newman-Keuls Test for sdia

NOTE: This test controls the Type I experimentwise error rate
complete null hypothesis but not under partial null hypotheses

Alpha                           0.05
Error Degrees of Freedom          17
Error Mean Square           4.627549
Harmonic Mean of Cell Sizes        6

NOTE: Cell sizes are not equal.

Number of Means              2              3
Critical Range       2.6203508      3.1861245  <- From equation use q = 2.98, 3.63 of Table 10

Means with the same letter are not significantly different.

SNK
Grouping        Mean      N    machine
A         5.949     10    c
B    A         3.575      5    b
B              2.700      5    a

Tukey's Studentized Range (HSD) Test for sdia

NOTE: This test controls the Type I experimentwise error rate,
generally has a higher Type II error rate than REGWQ.

Alpha                                   0.05
Error Degrees of Freedom                  17
Error Mean Square                   4.627549
Critical Value of Studentized Range  3.62796  <- From Table 10
Minimum Significant Difference        3.1861
Harmonic Mean of Cell Sizes                6

NOTE: Cell sizes are not equal.

Means with the same letter are not significantly different.

Tukey
Grouping        Mean      N    machine
A         5.949     10    c
B    A         3.575      5    b
B              2.700      5    a

We can summarize the results as follows:

Level of         ---------sdia---------                              -------diameter-------
machine    N           Mean     Std Dev  LSD TUKEY SNK DUNCAN WALLER     Mean       Std Dev
a          5     2.70040161  1.14446010   B    B    B     B      B    8.3400000    6.521732
b          5     3.57461248  2.24224933  AB   AB   AB    AB     AB   16.8000000   22.431116
c         10     5.94879442  2.43398279  A    A    A     A      A    40.7200000   34.519939```

Note that to say that the square root transformed means are statistically different is the same as saying that the untransformed means are different. Hence the results of the multiple range test holds for the untransformed means as well.

To test the contrast in SAS we use a contrast statement. The only difficult thing is to make sure we get the correct contrast coefficients into the correct positions in the statement.

```
Dependent Variable: sdia
Contrast                   DF    Contrast SS    Mean Square   F Value   Pr > F
l1                          1    39.51668344    39.51668344      8.54   0.0095
```
• Let us take the output apart and see what we have.
• The contrast SS is the contrast sums of squares.
• This is the equation at the bottom of page 433 in the book.
• The mean square is the contrast SS divided by the degrees of freedom which is one, since there is only one equation in the contrast being tested.
• The F-value is the F-statistic as calculated from the equation on page 436, ie. the Contrast mean square divided by the Mean Square error from the AOV table.
• If you divide the Contast SS by the MSE you get the F-statistic. The pr > F value is the p-value associated with the observed F-value from an F table with ndf=1, ddf=error df .
• Hence everything you need to perform the requested test was here.