Learn R Programming

⚠️There's a newer version (2.8.0) of this package.Take me there.

loo (version 2.0.0)

Efficient Leave-One-Out Cross-Validation and WAIC for Bayesian Models

Description

Efficient approximate leave-one-out cross-validation (LOO) for Bayesian models fit using Markov chain Monte Carlo. The approximation uses Pareto smoothed importance sampling (PSIS), a new procedure for regularizing importance weights. As a byproduct of the calculations, we also obtain approximate standard errors for estimated predictive errors and for the comparison of predictive errors between models. The package also provides methods for using stacking and other model weighting techniques to average Bayesian predictive distributions.

Copy Link

Version

Install

install.packages('loo')

Monthly Downloads

44,245

Version

2.0.0

License

GPL (>= 3)

Maintainer

Jonah Gabry

Last Published

April 11th, 2018

Functions in loo (2.0.0)

loo-package

Efficient LOO-CV and WAIC for Bayesian models
example_loglik_array

Objects to use in examples and tests
extract_log_lik

Extract pointwise log-likelihood from a Stan model
print.loo

Print methods
pareto-k-diagnostic

Diagnostics for Pareto smoothed importance sampling (PSIS)
gpdfit

Estimate parameters of the Generalized Pareto distribution
kfold-helpers

Helper functions for K-fold cross-validation
E_loo

Compute weighted expectations
nlist

Named lists
old-extractors

Extractor methods
compare

Model comparison
psislw

Pareto smoothed importance sampling (deprecated, old version)
relative_eff

Convenience function for computing relative efficiencies
loo

Efficient approximate leave-one-out cross-validation (LOO)
loo_model_weights

Model averaging/weighting via stacking or pseudo-BMA weighting
psis

Pareto smoothed importance sampling (PSIS)
print_dims

Print dimensions of log-likelihood or log-weights matrix
loo-datasets

Datasets for loo examples and vignettes
waic

Widely applicable information criterion (WAIC)