Learn R Programming

RoBMA (version 4.0.0)

loo_weights.brma: Extract Normalized PSIS Weights from brma Object

Description

Extract the normalized Pareto smoothed importance sampling (PSIS) weights from a brma model object.

Usage

# S3 method for brma
loo_weights(object, unit = "estimate", ...)

Value

An S x K matrix for estimate-unit LOO, or S x G

matrix for cluster-unit LOO, with posterior samples in rows and LOO targets in columns. Columns are normalized to sum to one.

Arguments

object

a brma model object.

unit

output/deletion unit. See add_loo.

...

currently unused.

Details

LOO must first be computed with object <- add_loo(object, unit = unit). This method extracts the stored PSIS object and does not compute LOO.