Learn R Programming

loo (version 2.8.0)

pointwise: Convenience function for extracting pointwise estimates

Description

Convenience function for extracting pointwise estimates

Usage

pointwise(x, estimate, ...)

# S3 method for loo pointwise(x, estimate, ...)

Value

A vector of length equal to the number of observations.

Arguments

x

A loo object, for example one returned by loo(), loo_subsample(), loo_approximate_posterior(), loo_moment_match(), etc.

estimate

Which pointwise estimate to return. By default all are returned. The objects returned by the different functions (loo(), loo_subsample(), etc.) have slightly different estimates available. Typically at a minimum the estimates elpd_loo, looic, mcse_elpd_loo, p_loo, and influence_pareto_k will be available, but there may be others.

...

Currently ignored.

Examples

Run this code
x <- loo(example_loglik_array())
pointwise(x, "elpd_loo")

Run the code above in your browser using DataLab