Laerd Statistics LoginCookies & Privacy

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 , and . Therefore, under column we entered the name of the dependent variable, Interest in Politics, as follows: . Then, under column we entered the name of the first independent variable, Gender, as follows: . Next, under column we entered the name of the second independent variable, Educational Level, as follows: . 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



Minitab 17

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):

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