thin_draws {posterior} | R Documentation |
Thin draws
objects
Description
Thin draws
objects to reduce their size and autocorrelation in
the chains.
Usage
thin_draws(x, thin = NULL, ...)
## S3 method for class 'draws'
thin_draws(x, thin = NULL, ...)
## S3 method for class 'rvar'
thin_draws(x, thin = NULL, ...)
Arguments
x |
(draws) A |
thin |
(positive numeric) The period for selecting draws. Must
be between 1 and the number of iterations. If the value is not an
integer, the draws will be selected such that the number of draws
returned is equal to round(ndraws(x) / thin). Intervals between
selected draws will be either ceiling(thin) or floor(thin), such
that the average interval will be close to the thin value. If
|
... |
Arguments passed to individual methods (if applicable). |
Value
A draws
object of the same class as x
.
References
Teemu Säilynoja, Paul-Christian Bürkner, and Aki Vehtari (2022). Graphical test for discrete uniformity and its applications in goodness-of-fit evaluation and multiple sample comparison. Statistics and Computing. 32, 32. doi:10.1007/s11222-022-10090-6
Examples
x <- example_draws()
niterations(x)
x <- thin_draws(x, thin = 5)
niterations(x)