identity.test {ENMTools} | R Documentation |
identity.test Conduct a niche identity/equivalency test as described in Warren et al. 2008.
Description
identity.test Conduct a niche identity/equivalency test as described in Warren et al. 2008.
Usage
identity.test(
species.1,
species.2,
env,
type,
f = NULL,
nreps = 99,
nback = 1000,
bg.source = "default",
low.memory = FALSE,
rep.dir = NA,
verbose = FALSE,
clamp = TRUE,
...
)
Arguments
species.1 |
An emtools.species object |
species.2 |
An enmtools.species object |
env |
A SpatRaster object containing environmental data |
type |
The type of model to construct, currently accepts "glm", "mx", "bc", "gam", "rf", or "dm" |
f |
A function to use for model fitting. Only required for GLM models at the moment. |
nreps |
Number of replicates to perform |
nback |
Number of background points for models |
bg.source |
Source for drawing background points. If "points", it just uses the background points that are already in the species object. If "range", it uses the range raster. If "env", it draws points at randome from the entire study area outlined by the first environmental layer. |
low.memory |
When set to TRUE, replicate models are written to disc instead of being stored in the output object. Replicate models stored in the output object contain paths to the replicate models on disk instead of the rasters themselves. |
rep.dir |
Directory for storing replicate models when low.memory is set to TRUE. If not specified, the working directory will be used. |
verbose |
Controls printing of various messages progress reports. Defaults to FALSE. |
clamp |
Controls whether empirical and replicate models should be clamped to the environment space used for training. |
... |
Additional arguments to be passed to model fitting functions. |
Value
results A list containing the replicates, models for the empirical data, and summary statistics and plots.
Examples
cyreni <- iberolacerta.clade$species$cyreni
monticola <- iberolacerta.clade$species$monticola
cyreni$range <- background.raster.buffer(cyreni$presence.points, 100000, euro.worldclim)
monticola$range <- background.raster.buffer(monticola$presence.points, 100000, euro.worldclim)
identity.test(cyreni, monticola, env = euro.worldclim, type = "glm",
f = pres ~ bio1 + bio12, nreps = 10)