expand_sample {bssm} | R Documentation |
The MCMC algorithms of bssm
use a jump chain representation where we
store the accepted values and the number of times we stayed in the current
value. Although this saves bit memory and is especially convenient for
IS-corrected MCMC, sometimes we want to have the usual sample paths.
Function expand_sample
returns the expanded sample based on the
counts. Note that for IS-corrected output the expanded
sample corresponds to the approximate posterior.
expand_sample(x, variable = "theta", times, states, by_states = TRUE)
x |
Output from |
variable |
Expand parameters |
times |
Vector of indices. In case of states, what time points to expand? Default is all. |
states |
Vector of indices. In case of states, what states to expand? Default is all. |
by_states |
If |