AIC.xnicher: Akaike information criterion for a xnicher fit

View source: R/ic.R

AIC.xnicherR Documentation

Akaike information criterion for a xnicher fit

Description

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)

Arguments

object

a fitted model object for which there exists a logLik method to extract the corresponding log-likelihood, or an object inheriting from class logLik.

...

Additional fitted model objects.

k

Numeric, the penalty per parameter; default 2 (AIC). Pass k = log(nobs(fit)) to recover BIC.

Value

Numeric scalar, or a data.frame when multiple objects are passed.

Examples


fit <- optimize_niche(env_occ = example_env_occ_2d,
                      env_m   = example_env_m_2d,
                      num_starts = 5L, likelihood = "weighted")
AIC(fit)


xnicher documentation built on Sept. 15, 2026, 5:08 p.m.