Login

Two-way ANOVA using Minitab

Introduction

The two-way ANOVA compares the effect of two categorical independent variables (called between-subjects factors) on a continuous dependent variable. In this sense, it is an extension of the one-way ANOVA. The common goal of a two-way ANOVA is to establish if there is an interaction between the two independent variables on the dependent variable. An interaction signifies that the effect of one of the two independent variables on the dependent variable is dependent on the other independent variable.

For example, you could use a two-way ANOVA to understand whether there is an interaction between physical activity level and gender on stress level (i.e., your dependent variable would be "stress score", measured on a continuous scale, and your independent variables would be "physical activity level", which has three groups – "low", "moderate" and "high" – and "gender", which has two groups: "males" and "females"). Alternately, you could use a two-way ANOVA to understand whether there is an interaction between physical activity level and gender on blood cholesterol concentration in children (i.e., your dependent variable would be "blood cholesterol concentration", measured on a continuous scale in mmol/L, and your independent variables would be "physical activity level", which has three groups – "low", "moderate" and "high" – and "gender", which has two groups: "males" and "females").

If you have a statistically significant interaction between your two independent variables on the dependent variable, it is possible to run "simple main effects" to determine the effect of one independent variable at each level of the other independent variable on the dependent variable (e.g., perhaps students with a PhD in the biological sciences had a higher mean salary than students with an undergraduate degree in psychology). We come back to "simple main effects" later.

In this "quick start" guide, we show you how to carry out a two-way ANOVA using Minitab, as well as interpret and report the results from this test. However, before we introduce you to this procedure, you need to understand the different assumptions that your data must meet in order for a two-way ANOVA to give you a valid result. We discuss these assumptions next.

Minitab

Assumptions

The two-way ANOVA has six assumptions. You cannot test the first three of these assumptions with Minitab because they relate to your study design and choice of variables. However, you should check whether your study meets these three assumptions before moving on. If these assumptions are not met, there is likely to be a different statistical test that you can use instead. Assumptions #1, #2 and #3 are explained below:

Assumptions #4, #5 and #6 relate to the nature of your data and can be checked using Minitab. You have to check that your data meets these assumptions because if it does not, the results you get when running a two-way ANOVA might not be valid. In fact, do not be surprised if your data violates one or more of these assumptions. This is not uncommon. However, there are possible solutions to correct such violations (e.g., transforming your data) such that you can still use a two-way ANOVA. Assumptions #4, #5 and #6 are explained below:

In practice, checking for assumptions #4, #5 and #6 will probably take up most of your time when carrying out a two-way ANOVA. However, it is not a difficult task, and Minitab provides all the tools you need to do this.

In the section, Test Procedure in Minitab, we illustrate the Minitab procedure required to perform a two-way ANOVA assuming that no assumptions have been violated. First, we set out the example we use to explain the two-way ANOVA procedure in Minitab.

Minitab

Example

A researcher was interested in whether an individual's interest in politics was influenced by their level of education and gender. Therefore, the dependent variable was "interest in politics", and the two independent variables were "gender" and "level of education".

In particular, the researcher wanted to know whether there was an interaction between education level and gender. Put another way, was the effect of level of education on interest in politics different for males and females?

To answer this question, a random sample of 60 participants were recruited to take part in the study – 30 males and 30 females – equally split by level of education: school, college and university (i.e., 10 participants in each group). Each participant in the study completed a questionnaire that scored their interest in politics on a scale of 0 to 100, with higher scores indicating a greater interest in politics.

Participants' interest in politics was recorded in the variable, Interest in Politics, their gender in the variable, Gender, and their level of education in the variable, Educational Level. In variable terms, the researcher wanted to know if there was an interaction between Gender and Educational Level on Interest in Politics.

Minitab

Setup in Minitab

In Minitab, we set up the three variables in columns C1, C2-T and C3-T. Therefore, under column C1 we entered the name of the dependent variable, Interest in Politics, as follows: Interest in Politics. Then, under column C2-T we entered the name of the first independent variable, Gender, as follows: Gender. Next, under column C3-T we entered the name of the second independent variable, Educational Level, as follows: Educational Level. Finally, we entered: (a) the scores on the dependent variable, interest in politics, for each participant scores into the Interest in Politics column; (b) the gender of each participant – "Male" or "Female" – into the Gender column; and (c) the educational level of each participant – "School", "College" or "University" – into the Educational Level column. This is illustrated below:

Data setup for the two-way ANOVA in Minitab

Published with written permission from Minitab Inc.

Note: You can also enter variables in numeric form. For example, in cells under the Gender column, you could enter "1" instead of "Male" and "2" instead of "Female" (i.e., assuming that you decided to code "Male" as "1" and "Female" as "2").

Minitab

Test Procedure in Minitab

In this section, we show you how to analyse your data using a two-way ANOVA in Minitab when the six assumptions in the previous section, Assumptions, have not been violated. The procedure changed from Minitab 16 to Minitab 17. Therefore, we present the procedure for both below:


Minitab 16

  1. Click Stat > ANOVA > Two-Way... on the top menu, as shown below:
    Main menu for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.


    You will be presented with the following Two-Way Analysis of Variance dialogue box:
    Options box for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note: The dependent variable will already be present in the main left-hand box (e.g., C1   Interest in Politics).

  2. Transfer the dependent variable, Interest in Politics, into the Response: box, as shown below:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note: To transfer the dependent variable into the Response: box, simply double click on it in the main left-hand box (e.g., C1   Interest in Politics). Alternately, you can click on the dependent variable once, which will activate the Select button (it is usually faded: Faded select button), and then click on the Select button. Your cursor should automatically be in the Response: box when you open the Two-Way Analysis of Variance dialogue box for the first time, but if not, you will first have to put your cursor into the Response: box before you transfer the dependent variable.

  3. Enter the first of the two independent variables, Gender, into the Row factor: box, and the second independent variable, Educational Level, into the Column factor: box.
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note 1: To transfer the independent variables, you first need to click into the relevant boxes – either the Row factor: box or the Column factor: box – for your independent variables to appear in the main left-hand box (i.e., C2   Gender and C3   Educational Level) (N.B., you will notice that there may be other variables in this main left-hand box in addition to your two independent variables, but you can just ignore these). You can now either select the variable you want to transfer (e.g., C2   Gender in the main left-hand box into the Row factor: box) by double-clicking on it or using the Select button, as you did in Step 2 above.

    Note 2: By default, Minitab uses 95% confidence intervals, which equates to declaring statistical significance at the p < .05 level. If you want to change the value of the confidence interval, simply enter the new value into the Confidence level: box (e.g., a value of 99.0 would equate to declaring statistical significance at the p < .01 level), highlighted in red below:

    Options box selected for the two-way ANOVA in Minitab (highlighted)

  4. Click on the OK button. The output that Minitab produces is shown below.



Minitab 17

  1. Click Stat > ANOVA > General Linear Model > Fit General Linear Model... on the top menu, as shown below:
    Main menu for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.


    You will be presented with the following General Linear Model dialogue box:
    Options box for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note: The dependent variable will already be present in the main left-hand box (e.g., C1   Interest in Politics).

  2. Transfer the dependent variable, Interest in Politics, into the Response: box, as shown below:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note: To transfer the dependent variable into the Responses: box, simply double click on it in the main left-hand box (e.g., C1   Interest in Politics). Alternately, you can click on the dependent variable once, which will activate the Select button (it is usually faded: Faded select button), and then click on the Select button. Your cursor should automatically be in the Responses: box when you open the General Linear Model dialogue box for the first time, but if not, you will first have to put your cursor into the Responses: box before you transfer the dependent variable.

  3. Transfer the two independent variables, Gender and Educational Level, into the Factors: box, as shown below:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

    Note: To transfer the independent variables, you first need to click into the Factors: box for your independent variables to appear in the main left-hand box (i.e., C2   Gender and C3   Educational Level) (N.B., you will notice that there may be other variables in this main left-hand box in addition to your two independent variables, but you can just ignore these). You can now either select the variables you want to transfer (e.g., C2   Gender and C3   Educational Level) in the main left-hand box into the Factors: box) by double-clicking on them or using the Select button, as you did in Step 2 above.

  4. Click on the Model button. You will be presented with the General Linear Model: Model dialogue box, as shown below:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

  5. Highlight both independent variables in the Terms in the model: box by clicking on them whilst holding down the shift-key. You will be presented with the following screen:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

  6. Click on the second Add button (i.e., the button on the Cross factors, covariates, and terms in the model line). This will add the interaction term between the two independent variables into the Terms in the model: box, as shown below:
    Options box selected for the two-way ANOVA in Minitab

    Published with written permission from Minitab Inc.

  7. Click on the OK button and you will be returned to the General Linear Model dialogue box.
  8. Click on the OK button. The output that Minitab produces is shown below:
Minitab

Output of the two-way ANOVA in Minitab

The Minitab 16 output for a two-way ANOVA is shown below:

Output for the two-way ANOVA in Minitab

And for Minitab 17 it is very similar (only the output relevant for this guide is shown here):

Output for the two-way ANOVA in Minitab

Both tables shown the effect of Gender, Educational Level and their interaction (i.e., the "Interaction" row in Minitab 16 and the "Gender*Educational Level" row in Minitab 17). The most important effect, and the effect you should look at first, is the interaction effect. You can see that the interaction effect is statistically significant because p = .0014 (i.e., the value in the "P" and "P-Value" columns in Minitab 16 and 17, respectively). You may want to report the results of Gender and Educational Level as well, but in the presence of an interaction, they are seldom interpreted and reported. The meaning of a statistically significant interaction is that the effect of Gender on Interest in Politics is dependent on Education Level (and vice versa); that is, the effect of Education Level on Interest in Politics is dependent on Gender. Due to this statistically significant interaction, you will also need to report simple main effects; that is, the effect of an independent variable at each level of the other independent variable. In our example, this would involve determining the mean difference in interest in politics between genders at each educational level, as well as between educational level for each gender (e.g., perhaps females with a university education had a greater interest in politics than males with a school education). Alternately, if you do not have a statistically significant interaction, you can report the main effects instead. Both the simple main effects and main effects can be calculated using Minitab.

Note: We present the output from the two-way ANOVA above. However, since you should have tested your data for the assumptions we explained earlier in the Assumptions section, you will also need to interpret the Minitab output that was produced when you tested for them. This includes: (a) the boxplots you used to check if there were any significant outliers; (b) the output Minitab produces for your Shapiro-Wilk test for normality to determine normality; and (c) the output Minitab produces for your Levene's test to determine whether there are homogeneity of variances. Also, remember that if your data failed any of these assumptions, the output that you get from the two-way ANOVA procedure (i.e., the output we discuss above) might no longer be valid, and you will need to interpret the Minitab output that is produced when they fail (i.e., this includes different results).

Minitab

Reporting the output of the two-way ANOVA

When you report the output of your two-way ANOVA, it is good practice to include:

Based on the Minitab output above, we could report the results of this study as follows (N.B., we have also included an example of a simple main effect):

  • General

A two-way ANOVA was run on a sample of 60 participants to examine the effect of gender and education level on interest in politics. There was a significant interaction between the effects of gender and education level on interest in politics, F (2, 54) = 4.64, p = .014. Simple main effects analysis showed that males were significantly more interested in politics than females when educated to university level (p = .002), but there were no differences between gender when educated to school (p = .465) or college level (p = .793).

Portions of information contained in this publication/book are printed with permission of Minitab Inc. All such material remains the exclusive property and copyright of Minitab Inc. All rights reserved.

1