myBIC: Calculate Bayesian Information Criterion (BIC)

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

myBICR Documentation

Calculate Bayesian Information Criterion (BIC)

Description

This function calculates the Bayesian Information Criterion (BIC) for a given model.

Usage

myBIC(LL, nparam, n)

Arguments

LL

Numeric value representing the log-likelihood of the model.

nparam

Numeric value representing the number of parameters in the model.

n

Numeric value representing the number of observations.

Details

The BIC is calculated using the formula:

BIC = -2 \cdot LL + nparam \cdot \log(n)

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

Value

Numeric value representing the BIC.

Examples

LL <- -120.5
nparam <- 5
n <- 100
myBIC(LL, nparam, n)


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