Learn R Programming

echoice2 (version 0.2.3)

logMargDenNRu: Log Marginal Density (Newton-Raftery)

Description

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

Usage

logMargDenNRu(ll)

Value

A single numeric value representing the log marginal density

Arguments

ll

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

Details

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

Examples

Run this code
logll_values <- c(-4000, -4001, -4002)
logMargDenNRu(logll_values)

Run the code above in your browser using DataLab