compute_IC {ddtlcm}R Documentation

Compute information criteria for the DDT-LCM model

Description

Compute information criteria for the DDT-LCM model, including the Widely Applicable Information Criterion (WAIC), and Deviance Information Criterion (DIC). WAIC and DIC are computed using two different methods described in Gelman, Hwang, and Vehtari (2013), one based on (1) posterior means and the other based on (2) posterior variances.

Usage

compute_IC(result, burnin = 5000, ncores = 1L)

Arguments

result

a "ddt_lcm" object

burnin

an integer specifying the number of burn-in iterations from MCMC chain

ncores

an integer specifying the number of cores to compute marginal posterior log-likelihood in parallel

Value

a named list of the following elements

WAIC_result

a list of WAIC-related results computed using the two methods

DIC1

DIC computed using method 1.

DIC2

DIC computed using method 2.

Examples

data(result_diet_1000iters)
IC_result <- compute_IC(result = result_diet_1000iters, burnin = 800, ncores = 1L)

[Package ddtlcm version 0.2.1 Index]