| WINKS Manual Index | Help | Home | Tutorials |

WINKS Online Manual


Chapter 5 Part 2

Two-way ANOVA (Professional Edition)

An analysis of variance is a method of comparing means between several experimental groups. In a two way analysis of variance, the experimental design consists of two grouping factors and one or more observations on each combination of the grouping factors. For example, suppose you have designed an experiment to examine the

effectiveness of several display strategies on sales. You have selected three display widths, and two heights, giving you 6 display combinations. In order to make comparisons of sales for each combination of height and width, you want to place one of the 6 display combinations at each of several stores. Then, after a period of time, you will examine the sales from each combination to see if you can discover which combination produces the most sales.

You decide to use each of the display combinations 4 times, which means you must have a total of 24 display locations. In order to prevent possible bias in choosing which combination to use where, you randomly choose where to place each combination, making sure that each of the 6 combinations is used 4 times.  After a selected time period, you collect the data, which is number of sales per display. Your data is summarized as follows:

                                Display Width

Display
Height             Short   Regular    Wide
 Bottom            24         31          35
                         25         28          32
                         30         33          31
                         28         35          38

     
Top
             31         36          41
                         32         32          36
                         33         33          34
                         36         41          32

In order to enter this data into WINKS, you must create a database that contains 24 records, one record for each observation. Each record must specify the height, width, and an observation (Sales). Therefore, you would create a database with the three variables HEIGHT, WIDTH, and SALES. In Height, you will designate the levels as B and T, and for Width, you choose to call the levels 1, 2 and 3. (Note: It is best to choose level indicators that are alphabetical or numeric since the program will use this to create its summary of the data. If we call width S, R and W, then the data would be summarized in the order R, S and W.) The data in the SALES database should look like this:

HEIGHT    WIDTH    SALES
B                   1            24
B                   1            25
B                   1            30
B                   1            28
etc...
T                   1            32
T                   1            33
etc...
T                   3            36
T                   3            34
T                   3            32
 
To perform this analysis, follow these steps:

Step 1: Open the database named SALES.

Step 2: From the Analyze menu, select “Advanced ANOVA,” then choose the Two-Way ANOVA option

Step 3: Choose HEIGHT and WIDTH as Group factors and SALES as the data value.

Step 4: You will be prompted to indicate if the grouping factors are FIXED or RANDOM. A FIXED factor is one that you have purposely chosen from a set of possibilities - such as the height and width for your displays.  A RANDOM factor would be, for example, a factor where you chose the height and width randomly from a list of all possible heights and widths. The factors used in this experiment are fixed, since we specifically chose the heights and widths to test rather than randomly selecting them from a population of all possible heights and widths.

Step 5: WINKS will display the results in the viewer. A summary of the group means will be displayed as well as an ANOVA table. Following the summary is the analysis of variance table:

HEIGHT is a Fixed Factor. WIDTH is a Fixed Factor.

Analysis of Variance Table

Source           S.S.  DF     MS    F  Appx P 
---------------------------------------------
Total          407.96  23
  Cells        220.71   5
  WIDTH        108.33   2  54.17  5.21  0.016
  HEIGHT        92.04   1  92.04  8.85  0.008
  INTERACTION   20.33   2  10.17  0.98  0.395
 Within Cells  187.25  18  10.40
---------------------------------------------
 

If the interaction effect is considered non-significant, multiple comparisons of marginal means is appropriate.  Generally, the first number you will look at is the  INTERACTION" p-value. In this case, the interaction effect can be considered as statistically non-significant since the p-value for this test is 0.395. See the section titled "Interaction Plots" for more information on how to interpret the interaction effect."

When the interaction effect is non-significant, then it is appropriate to compare the means of the main factors (WIDTH and HEIGHT) directory (main effects).  If the interaction effect is significant, then it is appropriate to compare individual means (within the 6 combinations) rather than to compare HEIGHT for all WIDTHS and WIDTHS for all HEIGHTS.

Continuing with this current example, to examine main effects, you look at the p-value for WIDTH and HEIGHT. In this case, both HEIGHT and WIDTH effects are significant at the 0.05 level (since they both report p-values less than 0.05).  This means that both HEIGHT and WIDTH were important (at least statistically) factors affecting the number of sales in a display. Your next concern should be, "Which HEIGHT and which WIDTH produced the most sales?"

Looking at the number of sales for HEIGHT, you can state that sales from displays using the TOP location are statistically higher than sales using the BOTTOM location.

Since there are more than two levels of WIDTH, you must perform multiple comparison tests to determine where the statistical significances lie.  The program will give you an opportunity to do these comparisons.  You will choose to compare the marginal means for WIDTH (3 means). Some of the results of the Multiple comparison test are as follows:

                                 Critical Q
Comp         Difference  P   Q    (0.05) 
-----------------------------------------
Mean(3)-Mean(1) = 5.0   3  4.385  3.609*
Mean(3)-Mean(2) = 1.25  2  1.096  2.971
Mean(2)-Mean(1) = 3.75  2  3.289  2.971*

Comparisons marked with an asterisk “*” are significantly different at the 0.05 significance level (alpha-level). A graphic description of the multiple comparisons is given by:

Homogeneous Populations, groups ranked

                     
Gp  Gp   Gp
                      1      2      3
                              -------
                     ----
 
This is a graphical summary of the Newman-Keuls multiple comparisons test. At the 0.05 significance level, the Means of any two groups underscored by the same line are not significantly different.

In this case, you can conclude that the WIDTHS 2 and 3 are both better (more sales) than WIDTH 1, but no significant difference was found between WIDTHS 2 and 3.

Thus, your overall conclusion is that display sales are better in general at the top level, and better in general for widths 2 and 3 (regular and wide).  However, there was not enough evidence to conclude that the wide width produced more sales than the regular width. Note: If you use Tukey or Scheffe‚ comparisons, your results may differ.

Interaction Plots

From the viewer, you can click on the Graph button to display an interaction plot. It is valuable in analyzing the experiment to look at the interaction of mean values across combinations of the factors.

 
If the plots intersect, it usually means that an interaction effect exists.  That is, the means behaved differently across levels of the factors. If the plots are fairly parallel, it means that no interaction effect exists.  That is, the means behaved similarly across levels of the factor. If you examine the interaction plots for this example, you will see that the plots produce "almost" parallel lines -- at least they do not intersect.

Two-Way Unbalanced Design

An unbalanced design occurs when sample sizes for cells of the two-way ANOVA are not equal.  WINKS uses a technique called the "regression approach" to perform calculations. When the data are balanced, you will get the same answers using this option as the balanced options. For more information about the  unbalanced case, refer to the following references: Neter, Wasserman and Kutner (1990) , Kutner (1974) and Elliott and Woodward (1986). For those familiar with other statistical packages, this technique is the same as SPSS "Option 9" and SAS Type III SS.

Note: Care must be taken when you have unequal cell sizes. If the inequality across cells is great or if the inequality of cell sizes is due to some factor other than randomness, there may be serious violations of the underlying model.

Two Way Repeated Measure ANOVA

In a two-way analysis of variance, it is common to examine one "subject" at several points in time, or under several conditions. This differs from the replicates in the first example, which were all different locations.  In the first example, if all four replicated for each combination of displays was in the same store, say observed on different weeks, then it would have been a "repeated measures design." Thus, the main difference between the first example and this example is that the "replicates" in the first example were unrelated, and in the repeated measures example, the replicates are related.

This example for a two-factor analysis of variance with repeated measures on one factor is taken from Winer, page 525 (see reference list). In this example there are two methods of calibrating DIALS (factor A), and the levels of B are four SHAPES of the dials. Six subjects were randomly assigned to perform the calibrating on a particular dial (A) for all four shapes of dials. That is, each of the six subjects were observed four times, once for each combination of the DIAL/SHAPE settings. The scores observed are accuracy.

The data is as follows:

Repeated Measures Data from Winer, Page 525

            SUB-    --SHAPES--
  A (DIALS) JECT  B1 B2 B3 B4
            ----- -- -- -- --
     1       1     0  0  5  3
     1       2     3  1  5  4
     1       3     4  3  6  2
     2       4     4  2  7  8
     2       5     5  4  6  6
     2       6     7  5  8  9
 
For entry into a database, subjects are re-numbered as 1,2,3 and 1,2,3 . In this repeated measures design, the program will assume that subjects 1,2 and 3 in group 1 (A) are different than subjects 1,2, and 3 in group 2 (A). We are not necessarily interested in testing a subject effect in this experiment. Our objective is to determine if there is a Dial and/or Shape effect. Thus, the data in the database which will be called REPEAT2 will look like this:

GROUP VARS  Repeated measures
A   SUB      B1 B2 B3 B4
--  ---      -- -- -- -- 
1     1       0  0  5  3
1     2       3  1  5  4
1     3       4  3  6  2
2     1       4  2  7  8
2     2       5  4  6  6
2     3       7  5  8  9
 
To perform this analysis, follow these steps:

Step 1: Open the database named REPEAT2.DBF.

Step 2: From the Analyze menu select “Advanced ANOVA” then "Two-Way Repeated Measures ANOVA."

Step 3: You will then be prompted to choose grouping factors. Select variables A and SUB as your grouping factors, and variables B1,B2,B3 and B4 as the repeated measures.

NOTE: The order that you choose these in the program is important. When you are asked to choose the grouping variables, be sure to choose the variable on which the repeated measures are taken (in this case subject) as the second (2nd) in the list of grouping variables.

Step 4: The results will be displayed in the viewer. A summary of the calculation results include this information:

Analysis of Variance
-------------------------------------------
Source             DF     M.S.   F       P
-------------------------------------------
Between subjects    5
A                   1   51.04   11.89   0.03
Subjects in groups  4    4.29
Within Subjects    18
Repeated Measure    3   15.82   12.80   0.00
Interaction         3    2.49    2.01   0.17
Rep.Mes.xSub in gp 12    1.24
--------------------------------------------

If the interaction effect is considered non-significant, multiple comparisons of marginal means is appropriate. As in the previous example, look at the interaction effect first.

In this case, the interaction effect is not statistically significant (p = 0.17). This means that you may examine the main effects (A-Dials and Repeated Measures (B1,B2,B3,B4 - Shapes) test directly.  In this case, both the dial effect and shape effect are statistically significant (at the 0.05 level).

Since there are 2 dials, you can immediately conclude that there is a difference in mean accuracy scores between dials. Scores for dial A1 are significantly lower than scores for dial A2.

To examine where significances lie in the repeated measures (shapes), you must perform multiple comparisons.

Comparisons in the multiple comparisons table marked with an asterisk “*” are significantly different at the 0.05 significance level (alpha-level). A graphic description of the multiple comparisons is given by:

Homogeneous Populations, groups ranked

                      Gp    Gp   Gp   Gp
                      B2    B1   B4   B3
                                     ----------
                      ---------
 
The conclusion in this case is that the mean scores for shapes 3 and 4 are higher than the mean scores for shapes 1 and 2. Furthermore, there are no statistically significant differences between shapes 1 and 2 and between 3 and 4. Note: If you use Tukey or Scheffe‚ comparisons, your results may differ.

If an interaction effect had been present, you would need to compare cell means rather than marginal means. For example, you would compare dial 1, shape 1 with dial 1 shape 2, etc. A multiple comparison test is provided to do these comparisons.

Interaction Plots

From the viewer, you can click on the Graph button to display an interaction plot. If the line on the plot intersect, it usually means that an interaction effect exists.  If the lines are fairly parallel, it means that no interaction effect exists.


Three-Way ANOVA

The Three-Way Factorial design has three grouping factors (independent variables) and one observed value (dependent variable). WINKS allows up to 5 levels of each of the grouping factors. The model for the analysis can be stated as:

OBS = A B C A*B A*C B*C A*B*C

where A, B, and C are main effects of the three factors. A*C, A*C

and B*C are the two way interactions and A*B*C is the three way interaction. OBS is the observed (dependent) variable.

The Analysis of Variance table reports the sum of squares and resulting F-test for each of the components of the model. Type III sums of squares are calculated, allowing unequal cell sizes. Empty cells are not allowed. Interpretive problems may arise from an analysis having unequal cell sizes. You should reference a good book to determine if this effects your analysis (Such as Neter, Wasserman and Kutner).

To interpret a three factor, first look at the three way interaction.

If it is not significant, then look at the two way interaction. If these are not significant, then you can examine the main effects tests. Differences between groups in main effects of over two levels can be analyzed using multiple comparison procedures. If three way interaction is present, analysis of the two way interaction terms or the main effects is invalid. If there are significant two way interactions, then tests for main effects contained in those interactions are invalid. In these cases, you must perform comparisons of means by cells, or remodel your analysis.

For example, use the file called 3WAYAOV.DBF to perform an analysis. The three factors variable as A, B and C. The A factor has four levels, B has 3 and C has 2. The observed variable is OBS. Partial output for this analysis is:

Dependent Variable:OBS

Source             DF     Sum Sq       Mean Square     F     Value p
---------------------------------------------------------------------------
Betw. Trt.         15     802.3788     53.49192       3.98     .001
---------------------------------------------------------------------------
A                   3     258.6133     86.20444       6.41     .002
B                   1     367.1633    367.1633       27.31     .000
C                   1      87.65879    87.65879       6.52     .016
A*B                 3      50.06533    16.68844       1.24     .313
A*C                 3       7.615718    2.538573       .19     .903
B*C                 1       68.70384   68.70384       5.11     .032
A*B*C               3       54.02666   18.00889       1.34     .281
---------------------------------------------------------------------------
ERROR              28      376.4167    13.44345
---------------------------------------------------------------------------
TOTAL              43     1178.795

Three-way analysis output also includes summary statistics by group. If needed, you can use the Multiple Comparison analysis to perform comparisons of means.


 
Continue to Chapter 5 Part 3. (Advanced Regression.)  

     


| Previous Section | Next Chapter | WINKS Manual Index | Help | Home | Tutorials |