Learn R Programming

echoice2 (version 0.2.3)

ec_lmd_NR: Obtain Log Marginal Density from draw objects

Description

This is a helper function to quickly obtain log marginal density from a draw object

Usage

ec_lmd_NR(est)

Value

tibble with LMDs (first 25% of draws, next 25% of draws, ...)

Arguments

est

'echoice2' draw object

Details

Draws are split in 4 equal parts from start to finish, and LMD is computed for each part. This helps to double-check convergence.

Examples

Run this code
data(icecream)
#run MCMC sampler (use way more than 50 draws for actual use)
icecream_est <- icecream %>% dplyr::filter(id<100) %>% vd_est_vdm(R=50)
#obtain LMD by quartile of draws
ec_lmd_NR(icecream_est)

Run the code above in your browser using DataLab