window.mcmcOutput | R Documentation |
mcmcOutput
objects
The window
method extracts the subset of the draws between start
and end
. Setting thin = k
selects every k
th observation starting from start
.
Use window
to discard additional draws at the start of the chain if extra burn-in is required, or to reduce the size of the object by thinning. See the examples.
Any previous burn-in or thinning is ignored (unlike the coda::window.mcmc
method).
## S3 method for class 'mcmcOutput' window(x, start=1, end=NULL, thin=1, ...)
x |
an object of class |
start |
the first observation to retain. |
end |
the last observation to retain; if NULL, this is set to the end of the chain. |
thin |
the interval between retained observations. |
... |
further arguments for other methods (not used). |
Returns an object of class mcmcOutput
with the subset of observations.
Mike Meredith.
data(mcmcListExample) mco <- mcmcOutput(mcmcListExample) mco new1 <- window(mco, start=201) # Discard the first 200 draws in each chain new1 # Now only 800 per chain. new2 <- window(mco, thin=3) # Retain only 1/3 of the draws new2 # new2 is smaller; each chain reduced from 1000 to 333, total draws 999.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.