Skip to contents

Getting started

These vignettes demonstrate how to use the loo package to perform approximate leave-one-out cross-validation or exact K-fold cross-validation for Bayesian models fit using MCMC, compare models on estimated predictive performance on new data, and weight models for averaging predictive distributions.

Using the loo package (version >= 2.0.0)
Bayesian Stacking and Pseudo-BMA weights using the loo package
Writing Stan programs for use with the loo package
Holdout validation and K-fold cross-validation of Stan programs with the loo package

Migration

Guides for updating code when APIs change.

Migration guide

Predictive performance measures

Reference and workflow articles for the *_pred_measure() API (website only; not included in the CRAN package).

Predictive model performance: Predictive schemes with `pred_measure()`
Predictive model performance: Overview of measures
Model comparison: Explanation of `model_compare()`

Frequently asked questions

Cross-validation FAQ

Answers to frequently asked questions about cross-validation and the loo package (links to external site).