samplesSetting {BRugs}R Documentation

Change settings used for calculations

Description

These low level functions can be used to set begin, end, and thinning of chains as well as the first/last chain of the stored sample.

Usage

samplesSetBeg(begIt)
samplesSetEnd(endIt)
samplesSetThin(thin)
samplesSetFirstChain(first)
samplesSetLastChain(last)

Arguments

begIt

First iteration of the stored sample used for calculating statistics.

endIt

Last iteration of the stored sample used for calculating statistics.

thin

Every thin-th iteration of each chain is used to contribute to the statistics being calculated.

first, last

First/last chain of the stored sample used for calculating statistics.

Details

samplesSetBeg sets the first iteration of the stored sample used for calculating statistics to begIt.

samplesSetEnd sets the last iteration of the stored sample used for calculating statistics to endIt.

samplesSetThin sets the numerical field used to select every thin-th iteration of each chain to contribute to the statistics being calculated.

samplesSetFirstChain is used to set the first chain of the stored sample used for calculating statistics to be first.

samplesSetLastChain is used to set the last chain of the stored sample used for calculating statistics to be last.

Note

Note the difference between this and the thinning facility of the update function: when thinning via the update function we are permanently discarding samples as the MCMC simulation runs, whereas here we have already generated (and stored) a suitable number of (posterior) samples and may wish to discard some of them only temporarily. Thus, setting thin > 1 here will not have any impact on the storage (memory) requirements; if you wish to reduce the number of samples actually stored (to free-up memory) you should thin via the update function.

See Also

BRugs, help.WinBUGS


[Package BRugs version 0.9-2.1 Index]