Skip to contents

Exploring Relationships with Scatter Plots

This guide demonstrates how to explore the relationship between two continuous variables using a scatter plot.

The Clinical Scenario

A pathologist is studying malignant melanoma and wants to know if there is a relationship between the patient's age and the thickness of the tumor. The research question is:

Is there a statistically significant correlation between patient age and tumor thickness in melanoma?

We will use the melanoma dataset, which is included in the boot package and re-exported by ClinicoPath, to investigate this question.

Step 1: The Analysis in jamovi

  1. Load the melanoma dataset into jamovi.
  2. From the main analysis ribbon, click on JJStatsPlot -> Continuous vs Continuous -> Scatter Plot.

[Screenshot of the jamovi analysis ribbon showing the path to the Scatter Plot.] ***

  1. In the analysis window:
    • Move the age variable to the X-axis box.
    • Move the thickness variable to the Y-axis box.

[Screenshot of the analysis window showing the variables being assigned.] ***

Step 2: The Output Plot

jamovi will generate the following scatter plot, which shows the relationship between age and tumor thickness.

# Load the data
data("melanoma", package = "boot")

# Create the plot
jjscatterstats(
  data = melanoma,
  x = "age",
  y = "thickness",
  type = "parametric", # Use Pearson correlation
  title = "Correlation between Age and Tumor Thickness in Melanoma",
  subtitle = "Pearson correlation with 95% confidence interval",
  xlab = "Age (years)",
  ylab = "Tumor Thickness (mm)"
)

Step 3: Interpreting the Plot and Statistics

  • The Plot: Each point on the plot represents a single patient. The plot shows that there is a lot of variability in tumor thickness at all ages. The blue line is the regression line, which is the line of best fit that summarizes the relationship between the two variables. The line is slightly upward-sloping, which suggests a weak positive correlation.

  • The Statistics: The jjscatterstats function performs a correlation test to see if the relationship is statistically significant.

    • Correlation test: The plot shows the results of the Pearson correlation test: r = 0.13, p = 0.06.
    • Correlation coefficient (r): The value of r is 0.13, which indicates a very weak positive correlation. An r value close to 0 means there is little to no linear relationship.
    • p-value: The p-value is 0.06. This is slightly above the standard cutoff of 0.05. Therefore, we cannot conclude that there is a statistically significant linear relationship between age and tumor thickness in this dataset.

Step 4: Reporting the Results

Here is an example of how to report these findings:

A Pearson correlation was run to determine the relationship between patient age and tumor thickness in 205 patients with malignant melanoma. There was a very weak, non-significant positive correlation between the two variables (r = 0.13, p = 0.06). This suggests that there is no statistically significant linear relationship between age and tumor thickness in this patient cohort.