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 the graph structure (an upper triangular matrix in which
$g_{ij}=1$ if there is
size
The number of links in true graph (graph size).
prob
For "random" graph, it is the probability that a pair of nodes has a link. The default value is 0.2.
class
Is number of the classes for "cluster" option.
type
Type of data which has four options "Gaussian" (as a default), "non-Gaussian", "discrete", and "mixed".
For option "Gaussian", data is generated from multivariate normal distribution.
For option "non-Gaussian", data is transfered multivariate normal
cut
For simulated discrete data (type = "discrete"), it is number of categories for discrete variables. 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 of the variables. It is for "fixed"
option of graph.
sigma
A positive-definite symmetric matrix specifying the covariance matrix of the variables. It is for
"fixed" option of graph.
mean
A vector specifying the mean of the variables. The default value is zero.
vis
visualize the true graph pattern. The default value is FALSE.