if (FALSE) {
# Generating multivariate normal data from a 'random' graph
data.sim <- bdgraph.sim(n = 50, p = 6, size = 6, vis = TRUE)
bdgraph.obj <- bdgraph(data = data.sim, save = TRUE)
# Estimated posterior probability of the true graph
pgraph(bdgraph.obj, adj = data.sim)
# Estimated posterior probability of first and second graphs with highest probabilities
pgraph(bdgraph.obj, number.g = 2)
}
Run the code above in your browser using DataLab