Usage
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 )
Arguments
n
The number of samples required. The default value is 2.
p
The number of variables (nodes). The default value is 10.
graph
The graph structure with option "random"
(as a default), "cluster"
, "scale-free"
, "hub"
, "fixed"
, and "circle"
.
It also could be adjacency matrix corresponding to a graph
size
The number of links in the true graph (graph size).
prob
For a "random" graph, it is the probability that a pair of nodes has a link. The default value is 0.2.
class
Number of classes for option "cluster"
.
type
Type of data with four options "Gaussian"
(as a default), "non-Gaussian"
, "discrete"
, and "mixed"
.
For option "Gaussian"
, data are generated from multivariate normal distribution.
For
cut
Number of categories for simulating discrete data (type = "discrete"
). The default value is 4.
b
The degree of freedom for G-Wishart distribution, $W_G(b, D)$. The default is 3.
D
The positive definite $(p \times p)$ "scale" matrix for G-Wishart distribution, $W_G(b, D)$. The default is an identity matrix.
K
A positive-definite symmetric matrix specifying the precision matrix. It is for option graph = "fixed"
.
sigma
A positive-definite symmetric matrix specifying the covariance matrix. It is for option graph = "fixed"
.
mean
A vector specifying the mean of the variables. The default value is a zero vector.
vis
Visualize the true graph pattern. The default value is FALSE.