Learn R Programming

BDgraph (version 2.6)

select: Selecting the best graphs

Description

According to output of the BD-MCMC algorithm, this function gives us the graphs with the highest posterior probabilities.

Usage

select(output, plot = FALSE)

Arguments

output
a list which is the result of the BD-MCMC algorithm from the 'bdgraph' function.
plot
logical: if TRUE you will see the plot of best graph. The default is FALSE.

Value

  • GAdjacency matrix for the best graph (graph with the highest posterior probability).

References

Mohammadi, A. and E. C. Wit (2012). Gaussian graphical model determination based on birth-death MCMC inference, arXiv:1210.5371v4. http://arxiv.org/abs/1210.5371v4

See Also

bdgraph

Examples

Run this code
# generate the data from multivariate normal distribution
  data.sim <- bdgraph.sim(n = 100, p = 8, size = 10, vis = T)
  
  output <- bdgraph(data.sim, meanzero = T, iter = 2000)
  
  select(output)

Run the code above in your browser using DataLab