Learn R Programming

BDgraph (version 1.0)

selection.result: Selecting the best graphical model based on BDMCMC algorithm

Description

According to output of BDMCMC algorithm, this function gives us gives us the graphical models with the highest posterior probabioities.

Usage

selection.result(output, g = 2)

Arguments

output
A list which is the result of BDMCMC algorithm
g
Number of graphical models with highest probability that you can select, default is 2

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 and prob.allgraphs

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)
selection.result(output)

Run the code above in your browser using DataLab