tmb_ICs: Calculate Information criteria for TMB model

View source: R/tmbutils.R

tmb_ICsR Documentation

Calculate Information criteria for TMB model

Description

Note that the model need to report *point-wise density* of the likelihood to calculate the ICs

Usage

tmb_ICs(
  post_sample,
  pointwise = "pwdens",
  islog = TRUE,
  looic = FALSE,
  fix_nan = TRUE
)

Arguments

post_sample

posterior samples (results from ktools::sample_tmb)

pointwise

character name of pointwise predictive density reported from your model

islog

Is the pointwise density or log density?

looic

Report leave one out IC from 'loo' package?

fix_nan

replace NaN density with minimum density - pls check the likelihood yourself

Value

WAIC-1 and WAIC-2, DIC, and LOO when requested


kklot/ktools documentation built on Aug. 13, 2024, 7:08 p.m.