compute_information_criteria: Compute the AIC, DIC and WAIC

View source: R/compute_information_criteria.R

compute_information_criteriaR Documentation

Compute the AIC, DIC and WAIC

Description

This function returns the Aikake Information Criterion (AIC), the Deviance Information Criterion (DIC) and the Watanabe Aikake Information Criterion (WAIC) from a fit of the class FOIfit.

Usage

compute_information_criteria(FOIfit, ...)

Arguments

FOIfit

A FOIfit object

Value

A list with the class information_criteria, which contains the following items:

  • AIC: The Aikake Information Criterion.

  • DIC: The Deviance Information Criterion.

  • WAIC: The Wakanabe-Aikake Information Criterion.

  • MLE: The Maximum-likelihood, estimated as the maximal value of the likelihood in the drawn samples, used in the AIC.

  • k: Number of parameters, used in the AIC.

  • Dbar: Mean deviance, used in the DIC.

  • pD: Effective number of parameters of the model, used in the DIC.

  • pwaic: Estimated effective number of parameters, used in the WAIC.

  • lpd: log pointwise predictive density, used in the WAIC.

Author(s)

Nathanael Hoze nathanael.hoze@gmail.com

References

See Gelman et al., Understanding predictive information criteria for Bayesian models. Stat Comput (2014) 24:997-1016, DOI 10.1007/s11222-013-9416-2

Examples

data('one_peak_simulation')
model <- FOImodel(type='outbreak', K=1)
F1  = fit(model = model, data = data )
compute_information_criteria(FOIfit  = F1)


nathoze/Rsero documentation built on Dec. 1, 2024, 6:39 p.m.