computeWAIC function

computeWAIC

computeWAIC

Computes the value of WAIC (Widely Applicable Information Criterion) for the Hmsc model

computeWAIC(hM, ghN = 11, byColumn = FALSE)

Arguments

  • hM: a fitted Hmsc model object
  • ghN: order of Gauss-Hermite quadrature for approximate numerical integration
  • byColumn: describes whether WAIC is computed for the entire model byColumn=FALSE or for each column (i.e. species) byColumn=TRUE

Returns

the scalar WAIC

Details

The result is exact for normal and probit observational models. For Poisson-type observational model the result is obtained through numerical integration using Gauss-Hermite quadrature.

Examples

# Compute WAIC of previously sampled Hmsc object WAIC = computeWAIC(TD$m)
  • Maintainer: Otso Ovaskainen
  • License: GPL-3 | file LICENSE
  • Last published: 2022-08-11