waic: LOO-CV, WAIC and Raw LPPD Calculations

View source: R/waic.r

waicR Documentation

LOO-CV, WAIC and Raw LPPD Calculations

Description

Implements LOO-CV, WAIC and Raw LPPD for the model_judgement function. Contains the helper function "colVars" which calculates row-wise variances efficiently.

Usage

waic(stanfit, current_model, lik_name, impute_inf)

Arguments

stanfit

A Stanfit object fitted on synthetic data.

current_model

Name of the current model (Currently not in use.)

lik_name

Name under which the log likelihoods have been saved in the models. Needs to be identical across all Stanfit objects.

impute_inf

A boolean which regulates if underflow values should be automatically imputed or not. If FALSE, the models with such values will just be ignored. If TRUE, a report will be generated on how many values were imputed and for which models.

Value

A list with LOO-CV, WAIC and Raw LPPD calculations.


Seneketh/StanDDM documentation built on Oct. 17, 2023, 4:26 p.m.