getDAG | R Documentation |
This function extracts an adjacency matrix of a maximum scoring DAG from the result of the MCMC run.
getDAG(x, amat = TRUE, cp = FALSE)
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 |
adjacency matrix of a maximum scoring DAG (or CPDAG) discovered/sampled in one MCMC run
myscore<-scoreparameters("bge", Boston)
## Not run:
itfit<-learnBN(myscore,algorithm="orderIter")
maxEC<-getDAG(itfit,cp=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.