buildMCMC {BRugs}R Documentation

Generating mcmc.list objects for package coda

Description

This functions reads samples from OpenBUGS and converts the results into an object of class mcmc.list that can directly be used by package coda for further analysis.

Usage

buildMCMC(node, beg = samplesGetBeg(), end = samplesGetEnd(), 
    firstChain = samplesGetFirstChain(), 
    lastChain = samplesGetLastChain(), thin = samplesGetThin())

Arguments

node

Character vector of length 1, name of a variable in the model.

beg, end

Arguments to select a slice of monitored values corresponding to iterations beg:end.

firstChain, lastChain

Arguments to select a sub group of chains.

thin

To only use every thin-th value of the stored sample.

Details

If the variable of interest is an array, slices of the array can be selected using the notation variable[lower0:upper0, lower1:upper1, ...]. A star ‘*’ can be entered as shorthand for all the stored samples.

If the arguments are left at their defaults the whole sample for all chains will be used for calculation.

Value

An object of class mcmc.list which is a list containing mcmc objects.

See Also

mcmc.list, mcmc, BRugs, help.WinBUGS


[Package BRugs version 0.9-2.1 Index]