5.3.3 Two Way ANOVA


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

In some cases, we want to examine the relationship between two factors (categorical variables) and a continuous outcome variable. The effects on the outcome of the change in one factor may depend on the level of the other factor, so we need to consider the interactions between two factors. Two way ANOVA is an appropriate method to analyze the main effects of and interactions between two factors.

Minimum Origin Version Required: Origin 2016 SR0

What you will learn

This tutorial will show you how to:

  • Perform Two-way ANOVA
  • Interpret results from Two-Way ANOVA
  • Make the Interaction Plot

Steps

Researchers are interested in the effects of sex and dietary group on systolic blood pressure (SBP) The "dietary group" factor includes three groups: strict vegetarians (SV) who eat no animal products of any kind; lacto vegetarians (LV) who eat dairy products but no other animal products; and "normal" (NOR) subjects who eat a standard American diet. Sex and dietary group may be independent or they may interact with each other. One approach to solve this problem is to construct a two-way ANOVA model predicting mean SBP level.

Indexed data mode

Perform Two Way ANOVA

  1. Start with a new workbook and import the file \Samples\Statistics\SBP_Index.dat.
  2. Open the Two-Way ANOVA dialog by choosing the menu item Statistics: ANOVA: Two-Way ANOVA, then in the Input tab, set the Input Data mode as Indexed.
  3. Also in the Input tab, select column A,B and C for Factor A,Factor B and Data, respectively. Check the Interactions box.
    DOC-2411 TwoANOVA06a Magenta.png
  4. In the Descriptive statistics tab, check all boxes.
  5. In the Means Comparison tab, set Significance Level to 0.05, and check the box beside Tukey to select this test as the means comparison method.
    DOC-2411 TwoANOVA06b Magenta.png
  6. Click the OK button to perform Two-Way ANOVA.

Interpreting Results

TwoANOVA13.png

From the "Overall ANOVA" table in the Two-Way ANOVA result sheet, we can see that Dietary and Sex are both significant factors, but the interaction between them is not significant. So we can say that the main effects of both Dietary groups and Sex are significant, yet the effect on the outcome of the change in Dietary doesn't depend on the level of Sex.

The Interaction Plot

To further detect interaction, we can make an "Interaction Plot" using the following steps.

  1. Click on the green lock in the ANOVA2Way1 result sheet, and select Change Parameters to open the dialog again.
    TwoANOVA12.png
  2. Go to Mean Plot, and check all boxes.
    TwoANOVA MeanPlotTab.png
  3. We will get the Interaction plot
    TwoANOVA InteractionPlot.png


Recalculate

  1. Click on the green lock in the ANOVA2Way1 result sheet, and select Change Parameters to open the dialog again.
    TwoANOVA12.png
  2. In the Input tab in the open dialog, clear the interactions box and click the OK button.
DOC-2411 TwoANOVA17a Magenta.png

We can see that the Dietary and Sex are significant factors from the "Overall ANOVA" table. The mean of Nor is significantly greater than that of LV and SV for factor Dietary. The mean of Male is significantly greater than that of Female, from the "Dietary" table.

TwoANOVA14.png
TwoANOVA15.png

Raw Data Mode

  1. Start with a new workbook and import the file \Samples\Statistics\SBP_Raw.dat
  2. Highlight all columns and select menu item Statistics : ANOVA : Two-Way ANOVA to bring up the ANOVATwoWay dialog box. In the Input tab, choose Raw as the Input Data mode.
  3. Also in the Input tab, set Number of levels of Factor A as 2 and type Sex ,Male and Female for Name,Level1 Name and Level2 Name in Factor A branch ,respectively.
  4. Also in the Input tab, set Number of levels of Factor B as 3, and type Dietary Group ,SV ,LV and Nor for Name,Level1 Name, Level2 Name and Level3 Name in Factor A branch, respectively.
    DOC-2411 TwoANOVA05a Magenta.png
  5. In the Means Comparison tab, set Significance Level to 0.05, and check the box beside Tukey to use it as the means comparison method.
  6. Click the OK button to perform Two-Way ANOVA.