Learn R Programming

BCClong (version 1.0.3)

model.selection.criteria: Model selection

Description

A function that calculates DIC and WAIC for model selection

Usage

model.selection.criteria(fit, fast_version = TRUE)

Value

Returns the calculated score

Arguments

fit

an objective output from BCC.multi() function

fast_version

if fast_verion=TRUE (default), then compute the DIC and WAIC using the first 100 MCMC samples (after burn-in and thinning) . If fast_version=FALSE, then compute the DIC and WAIC using all MCMC samples (after burn-in and thinning)

Examples

Run this code
#import data
data(example1)
fit.BCC <- example1
res <- model.selection.criteria(fit.BCC, fast_version=TRUE)
res

Run the code above in your browser using DataLab