R Code for the paper: Biological traits can mediate species-specific quasi-extinction risks of macroinvertebrates in streams experiencing frequent extreme floods
Description
We studied three caddisfly species in the upstream drainage basin of a central Taiwan river. Our methodological approach comprised four steps (Fig. 2): we analyzed (1) long-term daily, mean discharge data to quantify the magnitude of high flow events; (2) abundance of the three caddisfly species to represent their long-term population dynamics; (3) spatiotemporal population dynamics to examine the effects of the flood magnitude (i.e., the abiotic factor) and density dependence (i.e., biotic factor), in scenarios with synchronous and asynchronous population dynamics (i.e., the spatial factor: spatial variability among sites); and (4) quasi-extinction risks, based on simulated synchronous and asynchronous population dynamics at different time periods across a flood magnitude gradient.