Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

weights.importance_sampling

Extract importance sampling weights


Description

Extract importance sampling weights

Usage

## S3 method for class 'importance_sampling'
weights(object, ..., log = TRUE, normalize = TRUE)

Arguments

object

An object returned by psis(), tis(), or sis().

...

Ignored.

log

Should the weights be returned on the log scale? Defaults to TRUE.

normalize

Should the weights be normalized? Defaults to TRUE.

Value

The weights() method returns an object with the same dimensions as the log_weights component of object. The normalize and log arguments control whether the returned weights are normalized and whether or not to return them on the log scale.

Examples

# See the examples at help("psis")

loo

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

v2.4.1
GPL (>= 3)
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]
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.