CRAN/E | loo

loo

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

Installation

About

Efficient approximate leave-one-out cross-validation (LOO) for Bayesian models fit using Markov chain Monte Carlo, as described in Vehtari, Gelman, and Gabry (2017) doi:10.1007/s11222-016-9696-4. 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.

Citation loo citation info
mc-stan.org/loo/
discourse.mc-stan.org
System requirements pandoc (>= 1.12.3), pandoc-citeproc
Bug report File report

Key Metrics

Version 2.7.0
R ≥ 3.1.2
Published 2024-02-24 34 days ago
Needs compilation? no
License GPL (≥ 3)
CRAN checks loo results

Downloads

Yesterday 2.019 0%
Last 7 days 9.427 -31%
Last 30 days 50.132 +16%
Last 90 days 123.902 +5%
Last 365 days 514.228 -17%

Maintainer

Maintainer

Jonah Gabry

jsg2201@columbia.edu

Authors

Aki Vehtari

aut

Jonah Gabry

cre / aut

Mans Magnusson

aut

Yuling Yao

aut

Paul-Christian Bürkner

aut

Topi Paananen

aut

Andrew Gelman

aut

Ben Goodrich

ctb

Juho Piironen

ctb

Bruno Nicenboim

ctb

Leevi Lindgren

ctb

Material

NEWS
Reference manual
Package source

In Views

Bayesian

Vignettes

Holdout validation and K-fold cross-validation of Stan programs with the loo package
Using the loo package
Using Leave-one-out cross-validation for large data
Approximate leave-future-out cross-validation for Bayesian time series models
Mixture IS leave-one-out cross-validation for high-dimensional Bayesian models
Avoiding model refits in leave-one-out cross-validation with moment matching
Leave-one-out cross-validation for non-factorized models
Bayesian Stacking and Pseudo-BMA weights
Writing Stan programs for use with the loo package

macOS

r-release

arm64

r-oldrel

arm64

r-release

x86_64

Windows

r-devel

x86_64

r-release

x86_64

r-oldrel

x86_64

Old Sources

loo archive

Depends

R ≥ 3.1.2

Imports

checkmate
matrixStats ≥ 0.52
parallel
posterior ≥1.5.0
stats

Suggests

bayesplot ≥ 1.7.0
brms ≥ 2.10.0
ggplot2
graphics
knitr
rmarkdown
rstan
rstanarm ≥ 2.19.0
rstantools
spdep
testthat ≥ 2.1.0

Reverse Depends

bistablehistory
evidence
spsurv
TriDimRegression

Reverse Imports

BAMBI
bayclumpr
bayesbr
bayesdfa
bayesforecast
bayesGAM
BayesGrowth
bayesnec
beanz
bellreg
blavaan
bmgarch
bmggum
bmscstan
brms
bsitar
causalOT
conformalbayes
disbayes
dynamite
expertsurv
FlexReg
flocker
glmmfields
hbamr
hBayesDM
hsstan
LMMELSM
mcmcsae
mcp
measr
MetaStan
missingHE
MixSIAR
pcFactorStan
projpred
publipha
rater
rbioacc
rmsb
rstan
rstanarm
rtmpt
StanMoMo
ubms
walker

Reverse Suggests

bayesplot
bayesvl
bmstdr
CopulaDTA
footBayes
performance
redist
rPBK
sccomp
tipsae
webSDM