thinsamples {bstrl} | R Documentation |
Thin a bstrlstate object by keeping only one sample every n, until the desired count remains.
thinsamples(state, count)
state |
Object of class bstrlstate, output by bipartiteRL, SMCMCupdate, PPRBupdate, or multifileRL |
count |
The number of desired samples after filtering |
This is useful to do before an SMCMC update. SMCMC produces independent samples, so fewer are required to get the same quality estimates.
An object of class bstrlstate, containing count samples.
data(geco_small_result)
filtered <- thinsamples(geco_small_result, 50)
stopifnot(ncol(filtered$Z) == 50)