This function uses the quick-and-dirty Newton-Raftery approximation for log-marginal-density.

logMargDenNRu(ll)

Arguments

ll

A vector of log-likelihood values (i.e., draws)

Value

A single numeric value representing the log marginal density

Details

Approximation of LMD based on Newton-Raftery. It is not the most accurate, but a very fast method.

Examples

logll_values <- c(-4000, -4001, -4002)
logMargDenNRu(logll_values)
#> [1] -4001.309