WAIC | R Documentation |
The function computes widely applicable information criterion (WAIC) and efficient approximate leave-one-out cross-validation (LOO) from fitted regression model objects of class `flexreg`
.
WAIC(model, ...)
## S3 method for class 'WAIC.flexreg'
print(x, ...)
model |
an object (or a list of objects) of class |
... |
additional arguments. |
x |
an object of class |
This function takes advantage of the loo package to compute the widely applicable information criterion (WAIC) and leave-one-out cross-validation (LOO) for objects of class `flexreg`
.
If a list of two or more objects of class `flexreg`
is provided, the function returns the difference in their expected predictive accuracy (see loo_compare
for further details).
A named list with components from loo
and waic
.
Vehtari, A., Gelman, A., Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing. 27(5), 1413–1432. doi:10.1007/s11222-016-9696-4
## Not run:
data("Reading")
FB <- flexreg(accuracy.adj ~ iq, data = Reading, type="FB", n.iter=1000)
WAIC(FB)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.