Generate null distributions and calculate synanthropy index

ssi(r = raster, data = dataset, resolution = 200, sim = 500, threshold = 30)

Arguments

r

The raster to be analysed (default name: raster)

data

The species dataset to be processed, containing columns named species, year, X, and Y (default name: dataset)

resolution

Resolution(s) to be tested, specified as the aggregation factor, i.e., the number of raster cells in each direction (horizontally and vertically) (default value: 200)

sim

Number of simulations (null distributions) to be generated (default value: 500)

threshold

Threshold of species occurrence under which the species will not be accounted for (default value: 30)

Value

Three data frames: speciesScores a short summary table (one line per species) with the mean of all effect size and the corresponding index (range between 1 to 10) for each resolution. The number of runs used to calculate the mean effect size is also specified. effSizes a data.frame compiling all the raw results, i.e, all the effect sizes per run, with corresponding information provided by the function cohens_d (rstatix package); n1 and n2 correspond to the number of occurrences compared (n1 for the null distribution and n2 for observed data). samplesList a data.frame archiving all the occurrence randomly drawn to assess scores.

Examples

example <- ssi(dataset)
#> Species found in the dataset:
#> Error in ssi(dataset): object 'dataset' not found