Skip to contents

Compute the Akaike Information Criterion corrected for small samples size (Warren and Seifert, 2011).

Usage

aicc(model, env)

Arguments

model

SDMmodel object.

env

rast containing the environmental variables.

Value

The computed AICc

Details

The function is available only for Maxent and Maxnet methods.

References

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–342.

See also

auc and tss.

Author

Sergio Vignali

Examples

# Acquire environmental variables
files <- list.files(path = file.path(system.file(package = "dismo"), "ex"),
                    pattern = "grd",
                   full.names = TRUE)

predictors <- terra::rast(files)

# Prepare presence and background locations
p_coords <- virtualSp$presence
bg_coords <- virtualSp$background

# Create SWD object
data <- prepareSWD(species = "Virtual species",
                   p = p_coords,
                   a = bg_coords,
                   env = predictors,
                   categorical = "biome")
#>  Extracting predictor information for presence locations
#>  Extracting predictor information for presence locations [35ms]
#> 
#>  Extracting predictor information for absence/background locations
#>  Extracting predictor information for absence/background locations [63ms]
#> 

# Train a model
model <- train(method = "Maxnet",
               data = data,
               fc = "l")

# Compute the AICc
aicc(model,
     env = predictors)
#> [1] 6731.672