simulateBlockDiagNetwork {shock} | R Documentation |
Simulate a modular network
Description
This function simulates a modular network with p
variables based on the partition of variables into blocks labels
.
Usage
simulateBlockDiagNetwork(p, labels)
Arguments
p |
number of variables in the network |
labels |
vector indicating the partition of variables into blocks |
Details
To simulate covariance matrices, we use the methodology detailed in Giraud, S. Huet, and N. Verzelen. Graph selection with GGMselect. 2009
http://fr.arxiv.org/abs/0907.0619 https://cran.r-project.org/package=GGMselect
Value
A |
simulated adjacency matrix |
C |
simulated correlation matrix |
Pcor |
simulated partial correlation matrix |
labels |
vector indicating the partition of variables into blocks provided as input of the function |
Examples
## number of variables
p <- 100
## number of blocks
K <- 15
## vector of partition into blocks
labels <- factor(rep(1:K, length.out=p))
## simulate network
g <- simulateBlockDiagNetwork(p,labels)
[Package shock version 1.0 Index]