myAIC: Calculate Akaike Information Criterion (AIC)

View source: R/metrics.R View source: R/regCompTest.R

myAICR Documentation

Calculate Akaike Information Criterion (AIC)

Description

This function calculates the Akaike Information Criterion (AIC) for a given model.

Usage

myAIC(LL, nparam)

Arguments

LL

Numeric value representing the log-likelihood of the model.

nparam

Numeric value representing the number of parameters in the model.

Details

The AIC is calculated using the formula:

AIC = -2 \cdot LL + 2 \cdot nparam

Where LL is the log-likelihood of the model and nparam is the number of parameters.

Value

Numeric value representing the AIC.

Examples

LL <- -120.5
nparam <- 5
myAIC(LL, nparam)


flexCountReg documentation built on Jan. 20, 2026, 1:06 a.m.