Sex | BW |
---|---|
F | 2.15 |
M | 2.55 |
F | 2.95 |
F | 2.70 |
M | 2.20 |
F | 1.85 |
M | 2.55 |
M | 2.60 |
ANOVA in Jamovi
Cheatsheet
This work was developed using resources that are available under a Creative Commons Attribution 4.0 International License, made available on the SOLES Open Educational Resources repository by the School of Life and Environmental Sciences, The University of Sydney.
- You have Jamovi installed, ideally 2.5.7.0 or later.
- You can follow instructions to select, click and drag elements in Jamovi.
- You already understand what ANOVA is and when to use it.
The data should be in a long format (also known as tidy data), where each row is an observation and each column is a variable (Figure 1). If your data is not already structured this way, reshape it manually in a spreadsheet program or in R using the pivot_longer()
function from the tidyr
package.
F | M |
---|---|
2.15 | 2.55 |
2.95 | 2.20 |
2.70 | 2.55 |
1.85 | 2.60 |
Download data
We have two separate datasets. The first dataset is part of the possums dataset used in BIOL2022 labs. It contains two numerical variables: ExpBLUP
and AactiveTBLUP
. The data is available in the file possums-blup.csv
.
The second dataset, penguins.csv
, contains data collected by Dr. Kristen Gorman and the Palmer Station, Antarctica LTER. Details about the dataset can be found here.
About
ANOVA summaries are often used when the model’s predictors/explanatory variables are categorical. This cheatsheet shows you how to perform ANOVA techniques in Jamovi.
ANOVA answers questions such as:
- Are there differences in plant height between these two locations? (Yes, similar to a two-sample t-test).
- Is location a significant predictor of species diversity?
- Is the mean height of kangaroos different between different species?
Interpretation of the results is not covered here.
Before we begin: install GAMLj3 module
The GAMLj3 module allows us to perform ANOVA as a GLM in Jamovi, which is not possible by default. To install the module, follow these steps:
- Select the Analyses tab.
- Click on the Modules button, and select jamovi library.
- Scroll down to find or do a search for GAMLj3.
- Click INSTALL, and wait for the installation to complete.
- Exit by clicking on the upper-right arrow button.
Similarity between ANOVA and linear regression
ANOVA results are identical to linear regression results when the predictors are categorical. We will show how to use the general linear model (GLM) approach to test some models in Jamovi. The traditional ANOVA approach is also provided.
The models
Below are two GLM models: one with a single categorical predictor and one with two categorical predictors – including an interaction term.
- The first model is equivalent to a One-way ANOVA: \(\text{body mass} \sim \text{species}\)
- The second model is equivalent to a Two-way ANOVA: \(\text{body mass} \sim \text{species} \times \text{sex}\)
Import penguins data
To import the data:
- Click on the Menu icon:
- Select Open > Browse, and navigate to the downloaded file.
- Click Open to load the data.
Run the ANOVA models
1. Construct the model
- Click on the Analyses tab and select Linear Models. Then select General Linear Model.
- Drag the
body_mass_g
variable to the Dependent Variables box. - Drag the
species
variable to the Factors box. - If you want to include the second predictor,
sex
, drag it to the Factors box as well. - With two predictors, you can also include an interaction term. This might be included by default, but if not:
- Expand the Model tab.
- Holding the
Ctrl
key, select bothspecies
andsex
. Then click on the bottom arrow to select Interaction.
2. Check assumptions
- Click on the Assumption Checks tab.
- Select any of the options to check the assumptions.
3. Post-hoc
For predictors with more than two levels, you might want to perform post-hoc tests to determine which levels are different.
- Click on the Post Hoc Tests tab.
- Drag the variable to test from the left box, to the right box.
- Select the correction method (e.g., Bonferroni) and whether you prefer confidence intervals by ticking the appropriate boxes.
- You can export the results as a table the same way as the ANOVA table (see below).
4. Export the ANOVA or Regression table
- Right-click on the table in the results pane.
- Select Copy.
- Open MS Word, Google Docs or equivalent, and paste.
- Edit the table as you see fit.
1. Construct the model
- Click on the Analyses tab and select ANOVA. Then select One-Way ANOVA.
- Drag the
body_mass_g
variable to the Dependent Variable box. - Drag the
species
variable to the Grouping Variable box. You can add more categorical predictors if needed.
2. Check assumptions
- In the Assumption Checks section, select all the options to check the assumptions of the model.
- Stick to the Welch’s ANOVA as it is more robust, but if the assumption of equal variances is met, you can also tick on Assume equal (Fisher’s) in he Variances section to perform a standard one-way ANOVA.
3. Export the ANOVA table
- Right-click on the table in the results pane.
- Select Copy.
- Open MS Word, Google Docs or equivalent, and paste.
- Edit the table as you see fit.
Other resources
- Jamovi documentation on ANOVA.