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

## Documentation for package ‘loo’ version 2.9.0

- DESCRIPTION file
- User guides, package vignettes and other documentation
- Package NEWS

## Help Pages

A C E G I K L M N O P R S T U V W

loo-package | Efficient LOO-CV and WAIC for Bayesian models

## -- A --

ap_psis | Pareto smoothed importance sampling (PSIS) using approximate posteriors
ap_psis.array | Pareto smoothed importance sampling (PSIS) using approximate posteriors
ap_psis.default | Pareto smoothed importance sampling (PSIS) using approximate posteriors
ap_psis.matrix | Pareto smoothed importance sampling (PSIS) using approximate posteriors

## -- C --

compare | Model comparison (deprecated, old version)
crps | Continuously ranked probability score
crps.matrix | Continuously ranked probability score
crps.numeric | Continuously ranked probability score

## -- E --

elpd | Generic (expected) log-predictive density
elpd.array | Generic (expected) log-predictive density
elpd.matrix | Generic (expected) log-predictive density
example_loglik_array | Objects to use in examples and tests
example_loglik_matrix | Objects to use in examples and tests
extract_log_lik | Extract pointwise log-likelihood from a Stan model
E_loo | Compute weighted expectations
E_loo.default | Compute weighted expectations
E_loo.matrix | Compute weighted expectations

## -- G --

gpdfit | Estimate parameters of the Generalized Pareto distribution

## -- I --

importance_sampling | A parent class for different importance sampling methods.
importance_sampling.array | A parent class for different importance sampling methods.
importance_sampling.default | A parent class for different importance sampling methods.
importance_sampling.matrix | A parent class for different importance sampling methods.
is.kfold | Generic function for K-fold cross-validation for developers
is.loo | Efficient approximate leave-one-out cross-validation (LOO)
is.psis | Pareto smoothed importance sampling (PSIS)
is.psis_loo | Efficient approximate leave-one-out cross-validation (LOO)
is.sis | Pareto smoothed importance sampling (PSIS)
is.tis | Pareto smoothed importance sampling (PSIS)
is.waic | Widely applicable information criterion (WAIC)

## -- K --

kfold | Generic function for K-fold cross-validation for developers
kfold-generic | Generic function for K-fold cross-validation for developers
kfold-helpers | Helper functions for K-fold cross-validation
kfold_split_grouped | Helper functions for K-fold cross-validation
kfold_split_random | Helper functions for K-fold cross-validation
kfold_split_stratified | Helper functions for K-fold cross-validation
Kline | Datasets for loo examples and vignettes

## -- L --

loo | Efficient approximate leave-one-out cross-validation (LOO)
loo-datasets | Datasets for loo examples and vignettes
loo-glossary | LOO package glossary
loo.array | Efficient approximate leave-one-out cross-validation (LOO)
loo.function | Efficient approximate leave-one-out cross-validation (LOO)
loo.matrix | Efficient approximate leave-one-out cross-validation (LOO)
loo_approximate_posterior | Efficient approximate leave-one-out cross-validation (LOO) for posterior approximations
loo_approximate_posterior.array | Efficient approximate leave-one-out cross-validation (LOO) for posterior approximations
loo_approximate_posterior.function | Efficient approximate leave-one-out cross-validation (LOO) for posterior approximations
loo_approximate_posterior.matrix | Efficient approximate leave-one-out cross-validation (LOO) for posterior approximations
loo_compare | Model comparison
loo_compare.default | Model comparison
loo_crps | Continuously ranked probability score
loo_crps.matrix | Continuously ranked probability score
loo_i | Efficient approximate leave-one-out cross-validation (LOO)
loo_model_weights | Model averaging/weighting via stacking or pseudo-BMA weighting
loo_model_weights.default | Model averaging/weighting via stacking or pseudo-BMA weighting
loo_moment_match | Moment matching for efficient approximate leave-one-out cross-validation (LOO)
loo_moment_match.default | Moment matching for efficient approximate leave-one-out cross-validation (LOO)
loo_moment_match_split | Split moment matching for efficient approximate leave-one-out cross-validation (LOO)
loo_predictive_metric | Estimate leave-one-out predictive performance..
loo_predictive_metric.matrix | Estimate leave-one-out predictive performance..
loo_scrps | Continuously ranked probability score
loo_scrps.matrix | Continuously ranked probability score
loo_subsample | Efficient approximate leave-one-out cross-validation (LOO) using subsampling, so that less costly and more approximate computation is made for all LOO-fold, and more costly and accurate computations are made only for m<N LOO-folds.
loo_subsample.function | Efficient approximate leave-one-out cross-validation (LOO) using subsampling, so that less costly and more approximate computation is made for all LOO-fold, and more costly and accurate computations are made only for m<N LOO-folds.

## -- M --

mcse_loo | Diagnostics for Pareto smoothed importance sampling (PSIS)
milk | Datasets for loo examples and vignettes

## -- N --

nobs.psis_loo_ss | The number of observations in a 'psis_loo_ss' object.

## -- O --

obs_idx | Get observation indices used in subsampling

## -- P --

pareto-k-diagnostic | Diagnostics for Pareto smoothed importance sampling (PSIS)
pareto_k_ids | Diagnostics for Pareto smoothed importance sampling (PSIS)
pareto_k_influence_values | Diagnostics for Pareto smoothed importance sampling (PSIS)
pareto_k_table | Diagnostics for Pareto smoothed importance sampling (PSIS)
pareto_k_values | Diagnostics for Pareto smoothed importance sampling (PSIS)
plot.loo | Diagnostics for Pareto smoothed importance sampling (PSIS)
plot.psis | Diagnostics for Pareto smoothed importance sampling (PSIS)
plot.psis_loo | Diagnostics for Pareto smoothed importance sampling (PSIS)
pointwise | Convenience function for extracting pointwise estimates
pointwise.loo | Convenience function for extracting pointwise estimates
print.compare.loo | Model comparison
print.compare.loo_ss | Model comparison
print.importance_sampling | Print methods
print.importance_sampling_loo | Print methods
print.loo | Print methods
print.psis | Print methods
print.psis_loo | Print methods
print.psis_loo_ap | Print methods
print.waic | Print methods
pseudobma_weights | Model averaging/weighting via stacking or pseudo-BMA weighting
psis | Pareto smoothed importance sampling (PSIS)
psis.array | Pareto smoothed importance sampling (PSIS)
psis.default | Pareto smoothed importance sampling (PSIS)
psis.matrix | Pareto smoothed importance sampling (PSIS)
psislw | Pareto smoothed importance sampling (deprecated, old version)
psis_n_eff_values | Diagnostics for Pareto smoothed importance sampling (PSIS)

## -- R --

relative_eff | Convenience function for computing relative efficiencies
relative_eff.array | Convenience function for computing relative efficiencies
relative_eff.default | Convenience function for computing relative efficiencies
relative_eff.function | Convenience function for computing relative efficiencies
relative_eff.importance_sampling | Convenience function for computing relative efficiencies
relative_eff.matrix | Convenience function for computing relative efficiencies

## -- S --

scrps | Continuously ranked probability score
scrps.matrix | Continuously ranked probability score
scrps.numeric | Continuously ranked probability score
sis | Standard importance sampling (SIS)
sis.array | Standard importance sampling (SIS)
sis.default | Standard importance sampling (SIS)
sis.matrix | Standard importance sampling (SIS)
stacking_weights | Model averaging/weighting via stacking or pseudo-BMA weighting

## -- T --

tis | Truncated importance sampling (TIS)
tis.array | Truncated importance sampling (TIS)
tis.default | Truncated importance sampling (TIS)
tis.matrix | Truncated importance sampling (TIS)

## -- U --

update.psis_loo_ss | Update 'psis_loo_ss' objects

## -- V --

voice | Datasets for loo examples and vignettes
voice_loo | Datasets for loo examples and vignettes

## -- W --

waic | Widely applicable information criterion (WAIC)
waic.array | Widely applicable information criterion (WAIC)
waic.function | Widely applicable information criterion (WAIC)
waic.matrix | Widely applicable information criterion (WAIC)
weights.importance_sampling | Extract importance sampling weights