# Step-by-Step Guide 9 (Jamovi):

# Correlation Matrix

## Overview

Here you will learn about the following:

How to generate a Correlation Matrix,

how to interpret its output; and

how to generate and interpret a Correlation Matrix using JJStatsPlot.

A Correlation Matrix is a neat little table/plot that shows whether two continuous variables are related. It provides you with a correlation coefficient that tells you about the strength of the relationship and whether it is significant or not. The cells in the table show you the correlation between two intersection variables. A correlation matrix is used to summarise relationships and will help you identify further types of analysis.

We have included the JJStatPlot version as this is actually easier and produces better tables/plots

## Dataset used for the Correlation Matrix

Skoczylis, Joshua, 2021, "Extremism, Life Experiences and the Internet", https://doi.org/10.7910/DVN/ICTI8T, Harvard Dataverse, Version 3.

## Correlation Matrix

## Correlation Matrix Hypothesis

Ho: There is no relationship between Age and Racism; and Strain/Resilience and Racism.

Ha: There is no relationship between Age and Racism; and Strain/Resilience and Racism.

## Correlation Matrix variables required

Racism_scale: Measures the participants' racism (negative numbers indicate racism, positive numbers indicate the absence of racism

Strain_Resilience_score: This variable measures strain and resilience. Negative numbers indicate high strain and low resilience, positive numbers indicate high resilience and low strain.

Age: Measures participants age

and/or

No ordinal Variable will be used in the examples below

Split by (Optional if using JJStatsPlot)

Gender: Gender of the participant

## Correlation Matrix Assumptions

Level of measurement: Pearson's R requires continuous variables. If your data is ordinal you will have to use the Spearman or Kendal Tau b test instead.

Related Pairs: Each observation should have paired values e.g. if you are using Weight and Height you should have an observation for both variables. If there are missing values Jamovi will remove relevant observations.

Absence of outliers: Outliers can have a big effect on your model as they can pull the correlation line too far in one direction or another. Avoid using data that have outliers that are more than -/+ 3.29 standard deviations away from the mean. Where necessary, transform your variable and exclude outliers (but you should have a rationale for excluding data)

Linearity: You should see a linear correlation within your data. You can generate a scatterplot to check your data first.

## Correlation Matrix: Step-by-Step Guide

1.

Select your variables

Navigate to Regression > Correlation Matrix

Now drag and drop a minimum of two continuous variables into the variables field. In our example we are selecting the following:

Racism_Scale, Strain_Resilience_Score & Age

A table will appear on your right.

2.

Selcting and interpeting your Correlation Coefficient

In the Correlation Coefficients section you can select between the following three:

Pearson: Select this if all of the assumptions have been met. Pearsons R is displayed on a scale of -1 to +1. 0 indicates no relationship. Negative numbers indicate a negative relationship and positive numbers a positive relationship. -/+1 indicates a perfect relationship.

-/+ 0.1 to -/+0.3 Weak

-/+ 0.3 to -/+0.5 Moderate

-/+0.5 and above Strong

Spearman: Select this if the assumptions have not been met or when you are using ordinal data. Spearman is displayed on a scale of -1 to +1. 0 indicates no relationship. Negative numbers indicate a negative relationship and positive numbers a positive relationship. -/+1 indicates a perfect relationship.

-/+ 0.00 to -/+0.20 Neglible

-/+0.21 to -/+0.40 Weak

-/+0.41 to -/+0.60 Moderate

-/+0.61 to -/+0.80 Strong

-/+0.81 to -/+1.00 Very Strong

Kendall's Tau B: Select this if your assumptions when your assumptions have not been met or when you are using ordinal data. Kendall's Tau B is displayed on a scale of -1 to +1. 0 indicates no relationship. Negative numbers indicate a negative relationship and positive numbers a positive relationship. -/+1 indicates a perfect relationship.

-/+0.00 to -/+0.10 Weak

-/+0.20 to -/+0.29 Moderate

-/+0.30 or above Strong

In our example, we are using Kendall's Tau B

2.

Select your table options

Additional Options:

In this section, you can add additional information to your correlation matrix. In Addition to reporting your significance, you might also want to Flag any significant correlations. This just makes them easier to stop.

In addition to the p-value, it is always nice to report the confidence intervals.

Hypothesis:

As with most tests you can specify whether your hypothesis was directional or not.

Plots:

If you wish, you can also generate a plot. This is not really a correlation matrix - it's a scatterplot with a regression line in it. You can also add variable density (dispersion to the side, as well as your statistics.

## Results: Accept the Null Hypothesis

1.

Correlation Maxtris Results

The Correlation matrix clearly shows that there is no significant relationship between the following:

Age and Racism (p 0.922)

Racism and Strain/Resilience (p 0.092)

At the same time, the correlation matrix does flag a significant correlation between Age and Strain/Resilience (p <.001) Although significant, the relationship between these two variables is very weak (Kendall's Tau B 0.067).

The same can be displayed visually. See plot below

## Correlation Matrix Using JJStatsPlot

The Hypothesis, variables required and assumptions are the same as above.

## Pre-Requisites

JJStatsPlot: This module allows you to create a series of plots for all data types as well as correlations between them. Each plot will come with some statistics - you will learn more about how to interpret them in later tutorials

Learn how to instal modules here.

## Correlation Matrix using JJStatsPlot: Step-by-Step Guide

Correlation Matrix Using JJStatsPlot

by J Skoczylis

1.

Create your Correlation Plot

Navigate to JJStatsPlot > Correlation Matrix

Now all you have to do is select your Type of Statistics in the Analysis section. If you select Parametric, Jamovi will use Pearson's R. If you select non-parametric Jamovi will select Spearman.

You can also select Robust if your data is not parametric. But in most cases, you can use either parametric or non-parametric tests.

In the Plots section, you can select AddGGPlot layer, but it won't change your graph much.

## Results: Accept the Null Hypothesis

1.

Correlation Matrix JJStatsPlot results

JJStatsPlot allows us to split the results in a Correlation Matrix. Below you can see two separate matrices one for each Gender.

As you would expect, there is a significant relationship between Age and Strain/Resilience for both genders - similar to the correlation matrix above. The Spearman correlation Coefficient (0.11) indicates that this relationship is very weak.

Interestingly when splitting the matrix by Gender, there also appears to be a significant relationship between Age and Racism for Females.

Both of these relationships have a Spearmen's correlation coefficient that indicates a very weak relationship between the variables.

The combined results are similar to those in the other Correlation Matrix. The only significant relationship that is flag is that between Age and Strain/Resilience.

As we have used Spearman's the score is slightly different to Kendall's Tau B, but it also indicates a very weak relationship (Spearman 0.1)