5: Correlations and Associations
Task A
Practice Task
Work through these exercises after reading the Correlations and Associations chapter, using the Doubs River data (spe and env). Four exercises are hands-on calculations and two are short conceptual questions.
Using the Doubs environmental data, compute the pairwise correlation matrix and display it as a correlation plot (for example with
corrplot::corrplot()orGGally::ggcorr()).Identify the two strongest positive and the two strongest negative statistically significant correlations among the environmental variables. Report each coefficient and its \(p\)-value (use
cor.test(), orHmisc::rcorr()/psych::corr.test()for the full matrix of \(p\)-values).Reproduce the species association matrix from the chapter: transpose the fish table so that species become the rows, then compute the among-species association (the
spp_assoc1/spp_assoc2workflow). Visualise the result.Recompute the association on the un-transposed species table. What is being correlated now, how do the dimensions of the result differ, and why is this not what we want for a species association? Demonstrate with code.
For the strongest environmental correlations you found in Exercise 2, give the mechanistic, ecological reason they covary along the upstream-downstream gradient of the Doubs River.
Explain what an association matrix, a correlation matrix, and a species dissimilarity matrix each represent and how they differ. What ecological insight does a species association matrix provide that a site-by-site dissimilarity matrix does not?
Assessment Criteria
This Task is not formally assessed. It is built around four hands-on analyses (Exercises 1–4) and two short conceptual questions (Exercises 5–6); work through all six and bring your annotated Quarto document to class for discussion.
Reuse
Citation
@online{smit2026,
author = {Smit, A. J.},
title = {5: {Correlations} and {Associations}},
date = {2026-06-13},
url = {https://tangledbank.netlify.app/BCB743/tasks/Task_A.html},
langid = {en}
}
