With the standard (d/2) log n parameter cost, MDL equals BIC/2 exactly –
the ESL Sec 7.8 identity, which is the point of the section. bits divides
the nat-valued result by log 2.
Usage
morie_esl_mdl(loglik, theta, n = NULL, prior_sd = NULL)
Arguments
- loglik
Maximised log-likelihood.
- theta
Fitted parameters, or just their count.
- n
Sample size; needed for the BIC-equivalent parameter cost.
- prior_sd
If given (with theta as values), use a Gaussian prior cost
instead of (d/2) log n.
Value
List with mdl, bits, data_cost, model_cost, bic, aic, d.
References
Rissanen, J. (1978). Modeling by shortest data description.
Automatica 14(5), 465-471.
Examples
r <- morie_esl_mdl(-120, 4, n = 100)
abs(r$mdl - r$bic / 2) < 1e-12
#> [1] TRUE