Compute the Akaike Information Criterion corrected for small samples size (Warren and Seifert, 2011).
aicc(model, env, parallel = FALSE)
stack
containing the environmental
variables.
logical, if TRUE
it uses parallel computation, default
is FALSE
.
The computed AICc
Parallel computation increases the speed only for large datasets due to the time necessary to create the cluster.
Warren D.L., Seifert S.N., (2011). Ecological niche modeling in Maxent: the importance of model complexity and the performance of model selection criteria. Ecological Applications, 21(2), 335<U+2013>342.
# NOT RUN {
# Acquire environmental variables
files <- list.files(path = file.path(system.file(package = "dismo"), "ex"),
pattern = "grd", full.names = TRUE)
predictors <- raster::stack(files)
# Prepare presence locations
p_coords <- condor[, 1:2]
# Prepare background locations
bg_coords <- dismo::randomPoints(predictors, 5000)
# Create SWD object
presence <- prepareSWD(species = "Vultur gryphus", coords = p_coords,
env = predictors, categorical = "biome")
bg <- prepareSWD(species = "Vultur gryphus", coords = bg_coords,
env = predictors, categorical = "biome")
# Train a model
model <- train(method = "Maxnet", p = presence, a = bg, fc = "l")
# Compute the AICc
aicc(model, predictors)
# }
# NOT RUN {
# Compute the AICc using parallel computation. This reduces the time only for
# large datasets, in this case it takes longer than the previous example due
# to the time used to start and stop a cluster
aicc(model, predictors, parallel = TRUE)
# }
Run the code above in your browser using DataLab