Filling index
To assess if abundance-environment plots show a polygon-shaped point cloud characterized by an upper boundary, we developed a procedure namedfilling index . This tool can be applied to any point cloud representing the relationship between two variables. Polygon-shaped point clouds are expected to present a continuum of points from zero-abundance to the upper boundary, i.e., a polygon filled with points (Fig 1A). Conversely, line-shaped patterns are expected to show empty space between the point cloud and the bottom of the plot - the X axis (Fig 1B). Overall, polygon-shaped point clouds are expected to have larger filling of the space, from zero-abundance to the upper boundary of points, than line-shaped point clouds.
To calculate the filling index for each plot, we first rasterize the observed point cloud, by adding a grid of 50x50 to the abundance-environment plot and identifying the cells overlapping with at least one data point (purple cells in Fig 3). Then, for each column of the raster, we identify the cells with the highest value of abundance (dark purple cells) and connect them to get the upper boundary of the data (dark purple line). Finally, we calculate the number of cells that included at least one observation in relation to the total number of cells bellow the upper boundary (i.e., sum of colored cells/sum of all cells bellow the line). The resulting filling index varies from 0 to 1, where a value of 1 indicates that the area below the upper boundary is fully filled and thus the plot represents a polygon.
To determine the probability of the observed point cloud being polygon-shaped, the observedfilling index is compared with a null distribution offilling indexes resulting from 100 simulated line-shaped plots (Fig 3B). Line-shaped plots are generated to have the same sample size and environmental variable values (X-axis) than the observed data. Abundance values (Y-axis) are simulated to resemble the general trend of the observed data, though following a line-shaped pattern, using the following procedure: i) we fitted a median QR (τ =0.5) to estimate the general trend of observed data; ii) we predicted the median abundance based on the observed environmental gradient (Ŷ|X); iii) we added variation to predicted median abundance (Ŷ) (we simulated variation under a normal distribution, with mean equals to zero and standard deviation equals to the square root of the maximum predicted abundance (σ = \(\sqrt{\max(Y)}\))). Finally, we calculated thefilling index of the simulated abundance-environment plot. We repeated the procedure 999 times, and then calculated the probability of occurrence of the observed filling index considering the distribution of null filling index es. If the observedfilling index is significantly higher than the simulated distribution, i.e., probability is lower than 0.05, then we concluded that the shape of the observed pattern is significantly different from a line.
We tested the performance of the filling index procedure in differentiating line- and polygon-shaped patterns by applying it to simulated point clouds (Fig 3D-F and Appendix S6). To do that, we generated 100 bivariate plots with different number of observations (n=400 and n=100) and dispersal values (σ = 1.1 to simulate line-shaped patterns, and σ = 2 to simulate polygon-shaped patterns). Moreover, we tested the performance of the procedure using two alternative grid resolutions for rasterization (plots rasterized by 50x50 cells or 25x25 cells). Finally, we tested whether the filling index procedure described above correctly classified the simulated point clouds as line- or polygon-shaped under each sample size and grid resolution scenario (Appendix S6).
We also exemplified the application of the filling index with the observational data used in this study, thus assessing whether the point clouds for tree and bird species were polygon-shaped.