plotpcor {BiDAG}R Documentation

Comparing posterior probabilitites of single edges

Description

This function can be used to compare posterior probabilities of edges in a graph

Usage

plotpcor(pmat, highlight = 0.3, printedges = FALSE, cut = 0.05, ...)

Arguments

pmat

a list of square matrices, representing posterior probabilities of single edges in a Bayesian network; see edgep for obtaining such a matrix from a single MCMC run

highlight

numeric, defines maximum acceptable difference between posterior probabilities of an edge in two samples; points corresponding to higher differences are highlighted in red

printedges

when TRUE the function also returns squared correlation and RMSE of posterior probabilities higher than the value defined by the argument 'cut' as well as the list of all edges whose posterior probabilities in the first two matrices differ more than 'highlight'; FALSE by default

cut

numeric value corresponding to a minimum posterior probabilitity which is included into calculation of squared correlation and MSE when 'printedges' equals TRUE

...

prameters passed further to the plot function (e.g. xlab, ylab, main) in case when the length of pmat equals 2

Value

plots concordance of posterior probabilitites of single edges based on several matrices (minimum 2 matrices); highlights the edges whose posterior probabilities in a pair of matrices differ by more than 'highlight'; when 'printedges' set to TRUE, the function returns also squared correlation and RMSE of posterior probabilities higher than the value defined by the argument 'cut' as well as the list of all edges whose posterior probabilities in the first two matrices differ by more than 'highlight'.

Author(s)

Polina Suter

Examples

Asiascore<-scoreparameters("bde", Asia)
## Not run: 
orderfit<-list()
orderfit[[1]]<-orderMCMC(Asiascore,MAP=FALSE,chainout=TRUE)
orderfit[[2]]<-orderMCMC(Asiascore,MAP=FALSE,chainout=TRUE)
pedges<-lapply(orderfit,edgep,pdag=TRUE)
plotpcor(pedges, xlab="run1", ylab="run2",printedges=TRUE)

## End(Not run)

[Package BiDAG version 2.0.4 Index]