getTrace {BiDAG}R Documentation

Extracting trace from MCMC object

Description

This function extracts a trace of

from the result of the MCMC run. Note that the last three options work only when the parameter 'scoreout' was set to TRUE.

Usage

getTrace(x, which = 0)

Arguments

x

object of class 'orderMCMC','partitionMCMC' or 'iterativeMCMC'

which

integer, indication which trace is returned: DAG scores (which = 0), DAGs (which = 1), orders (which = 2), order scores (which = 3)

Value

a list or a vector of objects representing MCMC trace, depends on parameter 'which'; by default, the trace of DAG scores is returned

Examples

myscore<-scoreparameters("bge",Boston)
## Not run: 
orderfit<-sampleBN(myscore,algorithm="order")
DAGscores<-getTrace(orderfit,which=0)
DAGtrace<-getTrace(orderfit,which=1)
orderscores<-getTrace(orderfit,which=3)

## End(Not run)

[Package BiDAG version 2.1.4 Index]