waic.cumhist {bistablehistory} | R Documentation |
Computes widely applicable information criterion (WAIC).
Description
Computes widely applicable information criterion via loo library. It can be used for a model comparison via loo::loo_compare() function.
Usage
## S3 method for class 'cumhist'
waic(x, ...)
Arguments
x |
A cumhist object. |
... |
Additional arguments (unused) |
Value
A named list, see loo::waic()
for details.
Examples
data(br_singleblock)
gamma_fit <- fit_cumhist(br_singleblock, state="State", duration="Duration")
waic_gamma <- waic(gamma_fit)
normal_fit <- fit_cumhist(br_singleblock, state="State", duration="Duration", family="normal")
waic_normal <- waic(normal_fit)
loo::loo_compare(waic_gamma, waic_normal)
[Package bistablehistory version 1.1.2 Index]