Learn R Programming

BDgraph (version 1.0)

plot_links: Plot of posterior distribution for graph according to number of their links

Description

This function is for ploting the posterior distribution of all possible graphs according to number of their links.

Usage

plot_links(output, min = 0, max = (nrow(output$As[[1]])) * (nrow(output$As[[1]]) - 1)/2)

Arguments

output
A list which is the result of BDMCMC algorithm
min
Minimum value for number of links
max
Maximum value for number of links

References

Mohammadi, A. and E. Wit (2012). Efficient birth-death MCMC inference for Gaussian graphical models, Journal of the Royal Statistical Society: Series B, submitted.

See Also

BDMCMC

Examples

Run this code
n=200; p=8
truK=diag(p)
for (i in 1:(p-1)) truK[i,i+1]=truK[i+1,i]=0.5
truK[1,p]=truK[p,1]=0.4
data=mvrnorm(n,c(rep(0,p)),solve(truK))
data(output.high)
  output <- output.high
output = BDMCMC(data)
plot_links(output)

Run the code above in your browser using DataLab