plotpedges {BiDAG}R Documentation

Plotting posterior probabilities of single edges

Description

This function plots posterior probabilities of all possible edges in the graph as a function of MCMC iterations. It can be used for convergence diagnostics of MCMC sampling algorithms order MCMC and partition MCMC.

Usage

plotpedges(
  MCMCtrace,
  cutoff = 0.2,
  pdag = FALSE,
  onlyedges = NULL,
  highlight = NULL,
  ...
)

Arguments

MCMCtrace

an object of class MCMCres

cutoff

number representing a threshold of posterior probability below which lines will not be plotted

pdag

logical, when true DAGs in a sample will be first coverted to CPDAGs

onlyedges

(optional) binary matrix, only edges corresponding to entries which equal 1 will be plotted

highlight

(optional) binary matrix, edges corresponding to entries which equal 1 are highlighted with "red"

...

(optional) parameters passed to the plot function

Value

plots posterior probabilities of edges in the graph as a function of MCMC iterations

Author(s)

Polina Suter

Examples

score100<-scoreparameters("bde", Asia[1:100,])
orderfit100<-orderMCMC(score100,plus1=TRUE,chainout=TRUE)
## Not run: 
score5000<-scoreparameters("bde", Asia)
orderfit5000<-orderMCMC(score5000,plus1=TRUE,chainout=TRUE)
plotpedges(orderfit100, pdag=TRUE)
plotpedges(orderfit5000, pdag=TRUE)

## End(Not run)

[Package BiDAG version 2.1.4 Index]