obs_idx: Get observation indices used in subsampling

View source: R/loo_subsample.R

obs_idxR Documentation

Get observation indices used in subsampling

Description

Get observation indices used in subsampling

Usage

obs_idx(x, rep = TRUE)

Arguments

x

A psis_loo_ss object.

rep

If sampling with replacement is used, an observation can have multiple samples and these are then repeated in the returned object if rep=TRUE (e.g., a vector c(1,1,2) indicates that observation 1 has been subampled two times). If rep=FALSE only the unique indices are returned.

Value

An integer vector.


stan-dev/loo documentation built on April 15, 2024, 10:34 p.m.