# Generating multivariate normal data from a 'random' graph
data.sim <- bdgraph.sim( n = 30, p = 6, size = 7, vis = TRUE )
# Runing sampling algorithm
output <- bdgraph( data = data.sim, iter = 10000 )
# comparing the result
plotroc( data.sim, output )
# To compare the result based on CGGMs approach
output2 <- bdgraph( data = data.sim, method = "gcgm", iter = 10000 )
# Comparing the results
plotroc( data.sim, output, output2 )
legend( "bottomright", c("Gaussian", "Copula"), lty = c(1,2), col = c(1, 4))
Run the code above in your browser using DataLab