We used the Maximum Entropy v.3.4.1 (MaxEnt) algorithm (Elith et al., 2011) to generate the modeled geographic distributions of each selected species. MaxEnt models comprise a probability distribution in which each grid cell predicts the suitability of conditions for each species (Elith et al., 2011). MaxEnt is a widely tested and robust algorithm for modeling species distributions, particularly when occurrence data is limited to presence-only records. Its ability to estimate probability distributions based on environmental constraints makes it well-suited for our dataset, ensuring reliable predictions even with sparse or incomplete occurrence data. Additionally, MaxEnt’s regularization techniques help prevent overfitting, making it an appropriate choice for capturing the ecological niches of the studied species while maintaining model generalizability.
The model was implemented using the maxent() function, with the following parameters:
model - maxent(predictors_current, sp.occ, args=c("-J","-P","randomtestpoints=25","replicates=10","replicatetype=bootstrap","randomseed"), path="Results")
model.repcurrent - predict(model,predictorscurrent)
model.meancurrent - mean(model.repcurrent)
writeRaster(model.meancurrent,filename="Results/currentrep.img",overwrite=TRUE,format="HFA")
predictors_current: The current climatic and topographic predictor variables used to model the species distribution (temporal range of 1970–2000; cropped to the rectangular region: Longitude: -81.2083° W to -56.7500° W, and Latitude: -32.5000° S to 16.2917° N).
sp.occ: The species occurrence data collected.
args: A set of additional arguments passed to the MaxEnt model:
-J: This option activates the Jackknife technique, which is used to assess the contribution of each predictor variable to the model's performance. It runs the model multiple times, each time excluding one predictor variable, to evaluate the effect of each variable on the model’s accuracy. This helps in understanding the relative importance of each variable in predicting species distribution.
-P: This option instructs MaxEnt to fill in missing values (i.e., raster cells without data) with zeros. This ensures that missing data does not affect the modeling process and helps maintain the integrity and completeness of the analysis.
randomtestpoints=25: Defines the number of random test points to be used for model evaluation.
replicates=10: Specifies the number of bootstrap replicates used for model validation.
replicatetype=bootstrap: Indicates that bootstrap sampling is used to create replicates.
randomseed: Ensures the model’s reproducibility by setting a fixed random seed for consistent results.
Next, the predict() function was applied to the MaxEnt model (model) using the predictorscurrent variables to generate species distribution predictions. The resulting predictions were stored in the object model.repcurrent.
The mean of the predictions across the 10 bootstrap replicates was calculated and stored in model.mean_current.
The averaged prediction (model.meancurrent) was then saved as a raster file (currentrep.img) in the specified format (HFA), with the option to overwrite any existing file.