thinsamples {bstrl}R Documentation

Thin a bstrlstate object

Description

Thin a bstrlstate object by keeping only one sample every n, until the desired count remains.

Usage

thinsamples(state, count)

Arguments

state

Object of class bstrlstate, output by bipartiteRL, SMCMCupdate, PPRBupdate, or multifileRL

count

The number of desired samples after filtering

Details

This is useful to do before an SMCMC update. SMCMC produces independent samples, so fewer are required to get the same quality estimates.

Value

An object of class bstrlstate, containing count samples.

Examples

data(geco_small_result)
filtered <- thinsamples(geco_small_result, 50)
stopifnot(ncol(filtered$Z) == 50)


[Package bstrl version 1.0.2 Index]