Learn R Programming

BDgraph (version 2.19)

select: Selecting the best graph

Description

Provides the graphs with the highest posterior probabilities. For more specific selection of graphs consult the 'prob' function.

Usage

select( output, cut = NULL, vis = FALSE )

Arguments

output
An object of S3 class "bdgraph", from function bdgraph.
cut
Threshold for including the links in the selected graph based on the posterior probabilities of the links; See the examples.
vis
Logical: if TRUE you will see the plot of best graph. The default is FALSE.

Value

  • GAdjacency matrix corresponding to the selected graph.

References

Mohammadi, A. and E. Wit (2015). Bayesian Structure Learning in Sparse Gaussian Graphical Models, Bayesian Analysis, 10(1):109-138 Mohammadi, A. and E. Wit (2015). BDgraph: An R Package for Bayesian Structure Learning in Graphical Models, Arxiv preprint arXiv:1501.05108v2 Mohammadi, A., F. Abegaz Yazew, E. van den Heuvel, and E. Wit (2015). Bayesian Modeling of Dupuytren Disease Using Gaussian Copula Graphical Models, Arxiv preprint arXiv:1501.04849v2

See Also

bdgraph

Examples

Run this code
# generating 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 )

select( output, cut = 0.5, vis = TRUE )

Run the code above in your browser using DataLab