getDAG {BiDAG} | R Documentation |
Extracting adjacency matrix (DAG) from MCMC object
Description
This function extracts an adjacency matrix of a maximum scoring DAG from the result of the MCMC run.
Usage
getDAG(x, amat = TRUE, cp = FALSE)
Arguments
x |
object of class 'orderMCMC','partitionMCMC' or 'iterativeMCMC' |
amat |
logical, when TRUE adjacency matrix is returned and object of class 'graphNEL' otherwise |
cp |
logical, when TRUE the CPDAG (equivalence class) is returned and DAG otherwise; FALSE by default |
Value
adjacency matrix of a maximum scoring DAG (or CPDAG) discovered/sampled in one MCMC run
Examples
myscore<-scoreparameters("bge", Boston)
## Not run:
itfit<-learnBN(myscore,algorithm="orderIter")
maxEC<-getDAG(itfit,cp=TRUE)
## End(Not run)
[Package BiDAG version 2.1.4 Index]