DIC: Compute Deviance Information Criterion (DIC) for a libbi...

Description Usage Arguments Value Author(s) Examples

View source: R/DIC.R

Description

Computes the DIC of a libbi object containing Monte-Carlo samples. The effective number of parameters is calculated following Gelman et al., Bayesian Data Analysis: Second Edition, 2004, p. 182.

Usage

1
2
## S3 method for class 'libbi'
DIC(x, bootstrap = 0, ...)

Arguments

x

a libbi object

bootstrap

number of bootstrap samples to take, 0 to just take data

...

any parameters to be passed to 'bi_read' (e.g., 'burn')

Value

DIC

Author(s)

Sebastian Funk

Examples

1
2
3
4
example_run <- bi_read(system.file(package="rbi", "example_output.nc"))
example_model_file <- system.file(package="rbi", "PZ.bi")
example_bi <- attach_data(libbi(example_model_file), "output", example_run)
DIC(example_bi)

rbi.helpers documentation built on July 2, 2020, 4:10 a.m.