Statistical analyses
We compared the richness of coral-associated macrofauna on live and dead corals over time, first of all surveyed macrofauna, as well as each for fishes and mobile macroinvertebrates, separately. We calculated randomized observed species richness (‘observed species richness’) of the community associated with finger coral heads by constructing randomized Species Accumulation Curves (SACs), calculating the mean SAC and its standard deviation from random permutations of the data, or subsampling without replacement (Gotelli & Colwell 2001). We also calculated Chao 1 estimated species richness (‘Chao 1 estimated richness’) for the entire community, fishes and mobile invertebrates, of coral heads using the Chao 1 estimator, a non-parametric species estimator for abundance data (Chao et al. 2009), including 95% confidence intervals based on the actual Chao estimator (Colwell & Elsensohn 2014).
We also compared the composition of coral-associated macrofauna on live and dead corals over time by performing a Principal Components Analysis (PCA) using raw abundances of coral-associated macrofauna as the response variables and treating each individual coral head in each survey as an individual sample. The PCA algorithm used unweighted singular value decomposition on values fitted using unweighted linear regression of chi-transformed data (Legendre and Legendre 2012). We then calculated Euclidean dissimilarities in composition using multiscale bootstrapped resampling.
Finally, we assessed the attributes that predicted associated richness by constructing linear mixed effects models of associated richness per coral head, first for all macrofauna, and then each for fishes and mobile macroinvertebrates. Overhead surface area of the coral colonies and maximum coral branch length were treated as fixed effects, individual coral heads and sites included in the model as random intercepts, and time was treated as a random slope.
We ran mixed effects models using the lme4 R package (Bates et al. 2015), we ran rarefaction (species accumulation curves) and principal components analysis using the vegan R package (Oksanen et al. 2020), and we calculated Chao 1 total estimated richness using the SpadeR package (Chao et al. 2016). All statistical analyses were conducted using R software (version 3.6.2, R Core Development Team 2017).