simulate {SBICgraph} | R Documentation |
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
data |
simulated data |
realnetwork |
real adjacency matrix |
priornetowrk |
prior adjacency matrix |
Author(s)
Jie Zhou
Examples
set.seed(1)
d=simulate(n=100,p=200, m1=100, m2=30)
d$data
d$realnetwork
d$priornetwork
[Package SBICgraph version 1.0.0 Index]