5: Correlations and Associations

Task A

Published

2026/06/13

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.

  1. Using the Doubs environmental data, compute the pairwise correlation matrix and display it as a correlation plot (for example with corrplot::corrplot() or GGally::ggcorr()).

  2. 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(), or Hmisc::rcorr() / psych::corr.test() for the full matrix of \(p\)-values).

  3. 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_assoc2 workflow). Visualise the result.

  4. 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.

  5. 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.

  6. 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

BibTeX 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}
}
For attribution, please cite this work as:
Smit AJ (2026) 5: Correlations and Associations. https://tangledbank.netlify.app/BCB743/tasks/Task_A.html.