Computes \(-2 \log L + 2 k\), where \(\log L\) is the un-penalised
log-likelihood (see logLik.xnicher) and \(k\) is the
number of free parameters.
Usage
# S3 method for class 'xnicher'
AIC(object, ..., k = 2)Examples
# \donttest{
fit <- optimize_niche(env_occ = example_env_occ_2d,
env_m = example_env_m_2d,
num_starts = 5L, likelihood = "weighted")
AIC(fit)
#> [1] 1310.801
# }