Skip to contents

AIC = -2 log L + 2k, with AICc when n is given and n - k - 1 > 0 (entries where it is not stay NA, as Python leaves them NaN). best_index is 0-based, as in Python.

Usage

morie_geron_aic(log_lik, k, n = NULL)

Arguments

log_lik

Scalar or vector of maximised log-likelihoods.

k

Scalar or vector of free-parameter counts.

n

Optional sample size for AICc.

Value

List with aic, aicc, delta, weights, best_index.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_aic(V, V)
#> $aic
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $aicc
#> [1] NA NA NA NA NA NA NA NA
#> 
#> $delta
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $weights
#> [1] 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
#> 
#> $best_index
#> [1] 0
#> 
#> $k
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $estimate
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Akaike information criterion (AIC = -2 log L + 2k)"
#>