"random"
, "cluster"
, "scale-free"
, "hub"
, "fixed"
, and "circle"
.
Based on the underling graph structure, it generates four different types of datasets, including multivariate Gaussian, non-Gaussian, discrete, or mixed data.bdgraph.sim( n = 2, p = 10, graph = "random", size = NULL, prob = 0.2,
class = NULL, type = "Gaussian", cut = 4, b = 3, D = diag(p),
K = NULL, sigma = NULL, mean = 0, vis = FALSE )
"random"
(as a default), "cluster"
, "scale-free"
, "hub"
, "fixed"
, and "circle"
.
It also could be adjacency matrix corresponding to a graph"cluster"
."Gaussian"
(as a default), "non-Gaussian"
, "discrete"
, and "mixed"
.
For option "Gaussian"
, data are generated from multivariate normal distribution.
For type = "discrete"
). The default value is 4.graph = "fixed"
.graph = "fixed"
.S3
class "sim"
is returned: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.04849v2bdgraph
# generating multivariate normal data from a 'random' graph
data.sim <- bdgraph.sim( n = 50, p = 10, prob = 0.3, vis = TRUE )
print(data.sim)
# generating multivariate normal data from a 'hub' graph
data.sim <- bdgraph.sim( n = 3, p = 6, graph = "hub", vis = FALSE )
data.sim $ data
# generating mixed data from a 'hub' graph
data.sim <- bdgraph.sim( n = 10, p = 8, graph = "hub", type = "mixed" )
data.sim $ data
Run the code above in your browser using DataLab