4.11 Example: Associations between species
It is instructive to consider some additional examples of the test of association where the variables are not evenly distributed. Specifically, we wish to cater for situations where the variables of interest are occurrences, densities or counts of species' abundances, as commonly encountered in community ecology.
In such cases, we should consider using the index of association ($I_{\tiny{A}}$ or $I_{\tiny{A}}^\star$) as our measure, because, in the majority of cases, there can be no sense in including joint absences (i.e., where both species take a value of zero, corresponding to sites where neither species occurs) in the consideration of whether the individuals of the two species are likely to be found together or not. Sites that contain neither species at all are simply non-informative in this regard.
Abra prismatica & Goniada maculata
From the 'Ekofisk macrofauna counts' dataset (see the previous page for how to access this data set), choose Analyse > Univariate > Association... and choose the bivalve, Abra prismatica, as 'Variable 1' and the polychaete Goniada maculata as 'Variable 2' (leaving defaults for the rest), then click 'OK'.
The output file shows a statistically significant positive association between these two variables; the index of association is $I_{\tiny{A}}$ = 80.3 and $P$ < 0.01.
This association is also evident visually in the scatter plot:
Note that standardising the variables first (e.g., by their totals), as would be desirable here, is not necessary to do as a separate step, and would actually have no effect, as that operation is done automatically as part of the calculation of the index itself (see Somerfield & Clarke (2013) ).
Amphictene auricoma & Trichobranchus roseus
Another example demonstrates how joint absences (double zeros) across the samples can occasionally yield counter-intuitive results when examining scatter plots. Let's run the test of association on the following two species of polychaete worms: Amphictene auricoma & Trichobranchus roseus.
The output file and graphics (based on the index of association) are shown below:
Despite having detected a significant positive association between these two species ($I_{\tiny{A}}$ = 59.3 and $P$ < 0.01), a classic pattern of positive correlation is not particularly obvious in the scatter plot. For these two species, more than a quarter of the data values are equal to zero.¶ We can, however, trust the outcome of the test, but this example serves to show how a raw scatter plot of all joint values (including the joint absences) may not assist us in ascertaining the nature of species' co-occurrence relationships. Other types of plots may be helpful in clarifying similarity in the patterns of species across multiple samples (e.g., boxplots, means plots, line plots, coherence plots, etc.).
Abra prismatica & Chaetozone setosa
Another example demonstrates how the test of association works in the case of a negative association. Consider the following two species: Abra prismatica & Chaetozone setosa. A. prismatica is a bivalve mollusc that can be negatively affected by contaminants in the field, while C. setosa is an opportunistic species that can flourish in polluted areas.
Running the test of association on this pair of species is done under the alternative hypothesis of there being a negative association between them, like so:
The results are shown below:
In the past, we would have looked at the (quite low) value for the index of association ($I_{\tiny{A}}$ = 16.7), but there would be no obvious way of asserting any particular statistical significance to this, one way or the other. Now, with the new tool for testing associations in PRIMER 8, we can use our adjusted index of association value as the test-statistic ($I_{\tiny{A}}^\star$ = -0.67) and, under permutation, it is clear that this negative association is highly statistically signifciant ($P$ = 0.0001). In other words, for this dataset, where you find one of these species, you do not tend to find the other one, and vice versa.
Note that, in all three of the above tests, the distribution of the index of association under permutation is not centred on zero, nor is it necessarily symmetric; yet, in all three cases, it is easy to examine the output provided (consisting of the empirical permutation distribution and the observed value of the test statistic relative to it) in order to ascertain the appropriate alternative hypothesis for any given test.
¶ We can very quickly calculate the number of zeros (and the number of non-zeros) for any variable(s) in any dataset by running the new 'Tools > Summary Stats...' in PRIMER 8.
![09.Abra_Goniada_dialog[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/09-abra-goniada-dialog-i.png)
![09b.Abra_Goniada_result[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/09b-abra-goniada-result-i.png)
![09c.Abra_Goniada_graphic[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/09c-abra-goniada-graphic-i.png)
![10b.Amph_Tricho_result[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/10b-amph-tricho-result-i.png)
![10c.Amph_Tricho_graphic[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/10c-amph-tricho-graphic-i.png)
![11.Abra_Chaetozone_dialog[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/11-abra-chaetozone-dialog-i.png)
![11b.Abra_Chaetozone_results[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/11b-abra-chaetozone-results-i.png)
![11c.Abra_Chaetozone_results[i].png](https://learninghub.primer-e.com/uploads/images/gallery/2025-12/scaled-1680-/11c-abra-chaetozone-results-i.png)