Calculates the Bayesian information criterion
Examples
# example using vector
data <- c(2, 13, 22, 25, 11, 12, 11, 23, 13, 24)
calc_bic(loglik = -110, data = data)
#> [1] 224.6052
# example using tabular data
data <- data.frame(
c(2, 13, 22, 25, 11, 12, 11, 23, 13, 24),
c(4, 15, 19, 1, 16, 10, 3, 17, 16, 3)
)
calc_bic(loglik = -110, data = data)
#> [1] 224.6052