samplesCoda {BRugs} | R Documentation |
Writing files in CODA format
Description
This function writes files in CODA format to be processed or imported, e.g, by some other software.
Usage
samplesCoda(node, stem, beg = samplesGetBeg(),
end = samplesGetEnd(), firstChain = samplesGetFirstChain(),
lastChain = samplesGetLastChain(), thin = samplesGetThin())
Arguments
node |
Character vector of length 1, name of a variable in the model. |
stem |
The filestem of the CODA files to be generated. See details. |
beg , end |
Arguments to select a slice of monitored values corresponding to iterations |
firstChain , lastChain |
Arguments to select a sub group of chains. |
thin |
to only use every |
Details
Example for argument stem
:
If stem = "c:/myFolder/foo"
, the resulting files
are called ‘fooCODAchain1.txt’, ..., ‘fooCODAchainN.txt’, and
‘fooCODAindex.txt’. They are written into the tempdir()
and copied to the path ‘"c:/myFolder"’.
If the variable of interest is an array, slices of the array can be selected using the notation
variable[lower0:upper0, lower1:upper1, ...]
.
If the arguments are left at their defaults the whole sample for all chains will be used for output.
Value
Prints ‘CODA files written’.
Note
If the MCMC simulation has an adaptive phase it will not be possible to make inference using values sampled before the end of this phase.