Learn R Programming

BDgraph (version 2.13)

select: Selecting the best graph

Description

According to output of the BD-MCMC algorithm, this function gives the graphs with the highest posterior probabilities. For more specific selection of graphs consult the 'prob' function.

Usage

select( output, vis = FALSE )

Arguments

output
An object with S3 class "bdgraph".
vis
Logical: if TRUE you will see the plot of best graph. The default is FALSE.

Value

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

References

Mohammadi, A. and Wit, E. C. (2014). Bayesian structure learning in sparse Gaussian graphical models, Bayesian Analysis, acceped. http://arxiv.org/abs/1210.5371v6

See Also

bdgraph

Examples

Run this code
# generating synthetic multivariate normal data from a 'random' graph
  data.sim <- bdgraph.sim( n = 50, p = 6, size = 7, vis = TRUE )
  
  output   <- bdgraph( data = data.sim )
  
  select(output)

Run the code above in your browser using DataLab