loo: LOO information criteria

Description Usage Arguments Examples

Description

Extract the LOOIC (leave-one-out information criterion) using loo::loo(). Note that we've implemented slightly different variants of loo, based on whether the DFA observation model includes correlation between time series or not (default is no correlation). Importantly, these different versions are not directly comparable to evaluate data support for including correlation or not in a DFA. If time series are not correlated, the point-wise log-likelihood for each observation is calculated and used in the loo calculations. However if time series are correlated, then each time slice is assumed to be a joint observation of all variables, and the point-wise log-likelihood is calculated as the joint likelihood of all variables under the multivariate normal distribution.

Usage

1
2
## S3 method for class 'bayesdfa'
loo(x, ...)

Arguments

x

Output from fit_dfa().

...

Arguments for loo::relative_eff() and loo::loo.array().

Examples

1
2
3
4
set.seed(1)
s <- sim_dfa(num_trends = 1, num_years = 20, num_ts = 3)
m <- fit_dfa(y = s$y_sim, iter = 50, chains = 1, num_trends = 1)
loo(m)

bayesdfa documentation built on May 29, 2021, 1:06 a.m.