simulate: Randomly generate a adjacency matrix based on which to simulate data
Description
According to a given edge density, first generate the adjacency matrix P of a graph.
Based on P, the simulated multivariate normal data is generated with
mean zero and a specified given precision matrix
Usage
simulate(n, p, m1, m2)
Arguments
n
Sample size
p
The number of vertices in graph or the number of variables
m1
The number of edges in the true graph
m2
The number of elements in adjacency matrix that stay in different states,
i.e., 0 or 1, in true and prior graphs
Value
A list including the simulated data, real adjacency matrix and a prior adjacency matrix