Learn R Programming

surveil (version 0.3.0)

waic: Widely Applicable Information Criteria

Description

Widely Application Information Criteria (WAIC) for model comparison

Usage

waic(fit, pointwise = FALSE, digits = 2)

Value

A vector of length 3 with WAIC, a rough measure of the effective number of parameters estimated by the model Eff_pars, and log predictive density Lpd. If pointwise = TRUE, results are returned in a data.frame.

Arguments

fit

An surveil object

pointwise

Logical (defaults to FALSE); if pointwise = TRUE, a vector of values for each observation will be returned.

digits

Round results to this many digits.

Examples

Run this code

data(msa)
austin_w <- subset(msa, grepl("Austin", MSA) & Race == "White")
fit <- stan_rw(austin_w, time = Year)
waic(fit)
 

Run the code above in your browser using DataLab