simulateBlockDiagNetwork: Simulate a modular network

Description Usage Arguments Details Value Examples

View source: R/simulateBlockDiagNetwork.R

Description

This function simulates a modular network with p variables based on the partition of variables into blocks labels.

Usage

1

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

1
2
3
4
5
6
7
8
9
## 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)
        

shock documentation built on May 29, 2017, 11:06 p.m.