Load packages, compute scores for both indexes, and join at the station-year level. anlz_ambiscr returns TBAMBI, the adjusted AMBI-TB score on a 0–10 scale where higher values indicate better benthic conditions – matching the direction of TBBI.
Mean ± 1 SE of each index by segment and year. Both axes are scaled so that higher values indicate better benthic conditions (TBBI: 0–100; adjusted AMBI-TB: 0–10).
Mean TBBI (top) and adjusted AMBI-TB (bottom) by bay segment and year. Ribbons show ±1 SE.
Scatterplots
Station-year level
Each point is one matched station-year. The blue line is a linear fit with a 95% CI. Pearson r is computed from all non-missing pairs within each segment.
Adjusted AMBI-TB vs TBBI at the station-year level, by bay segment.
Segment-year level
Each point is one segment-year mean value. Segment-year means reduce within-year station noise and highlight longer-term co-movement between the two indexes.
Code
rho <-cor(seg_yr$AMBI_mean, seg_yr$TBBI_mean, method ='spearman')ggplot(seg_yr, aes(x = AMBI_mean, y = TBBI_mean, colour = AreaAbbr)) +geom_point(size =2.2, alpha =0.85) +geom_smooth(aes(group =1), method ='lm', se =TRUE,colour ='grey30', linewidth =0.7) +annotate('text', x =Inf, y =-Inf,label =paste0('Spearman ρ = ', round(rho, 2)),hjust =1.1, vjust =-0.5, size =4) +scale_colour_brewer(palette ='Dark2', name ='Segment') +labs(x ='Mean adj. AMBI-TB', y ='Mean TBBI') +theme_bw(base_size =11)
Segment-year mean adjusted AMBI-TB vs mean TBBI, coloured by bay segment.
Concordance metrics by segment
Pearson r and Spearman rho computed at the station-year level for each bay segment. Both statistics use all matched, non-missing station-year pairs within each segment.
Station-year correlations between adjusted AMBI-TB and TBBI by bay segment.
Segment
n
Pearson r
Pearson p
Spearman rho
Spearman p
OTB
570
0.485
<0.001
0.557
<0.001
HB
569
0.285
<0.001
0.487
<0.001
MTB
622
0.372
<0.001
0.420
<0.001
LTB
377
0.317
<0.001
0.099
0.055
BCB
434
0.511
<0.001
0.523
<0.001
TCB
168
0.441
<0.001
0.525
<0.001
MR
243
0.135
0.035
0.350
<0.001
Directional agreement
Does AMBI-TB move in the same direction as TBBI from year to year within each segment? Year-over-year changes in segment-mean values are computed for both indexes. Points landing in the upper-right (both improve) or lower-left (both decline) quadrant indicate agreement.
Year-over-year change in segment-mean AMBI-TB vs TBBI. Dashed lines are zero-change references. Points in quadrants I and III indicate directional agreement.
Code
agree_tab <- delta |>group_by(Segment = AreaAbbr) |>summarise(Transitions =n(),Agree =sum(sign(dTBBI) ==sign(dAMBI)),`% Concordance`=round(100* Agree / Transitions, 1),`Kendall's tau`=round(cor(dAMBI, dTBBI, method ='kendall'), 3),.groups ='drop' )kable(agree_tab,caption ='Directional agreement between adjusted AMBI-TB and TBBI for year-over-year changes in segment means.')
Directional agreement between adjusted AMBI-TB and TBBI for year-over-year changes in segment means.