Learn R Programming

BiDAG (version 2.0.0)

plotpcor: Comparing posterior probabilitites of single edges based on several samples

Description

This function can be used to compare posterior probabilities of edges in a graph based on two samples of graphs

Usage

plotpcor(
  pmat,
  highlight = 0.3,
  cut = 0.05,
  main = "",
  xlab = "sample 1",
  ylab = "sample 2"
)

Arguments

pmat

a list of square matrices, representing posterior probabilities of single edges in a Bayesian network

highlight

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

cut

numeric value corresponding to a minimum posterior probabilitity which is included into calculation of squared correlation and MSE

main

character string, a title for the plot; ignored if length of pmat higher than 2

xlab

character string, a title for the x-axis; ignored if length of pmat higher than 2

ylab

character string, a title for the y-axis; ignored if length of pmat higher than 2

Value

plots posterior probabilitites of single edges from two MCMC runs; returns squared correlation and MSE of posterior probabilities higher than the value defined by the argument cut

Examples

Run this code
# NOT RUN {
Asiascore<-scoreparameters("bde", Asia)
# }
# NOT RUN {
orderfit<-list()
orderfit[[1]]<-orderMCMC(Asiascore,MAP=FALSE)
orderfit[[2]]<-orderMCMC(Asiascore,MAP=FALSE)
pedges<-lapply(orderfit,edgep,pdag=TRUE)
plotpcor(pedges)
# }

Run the code above in your browser using DataLab