simulateData: Generate Simulation Data from a Random Network.

View source: R/simulateData.R

simulateDataR Documentation

Generate Simulation Data from a Random Network.

Description

Generate a random network where both the network structure and the partial correlation coefficients are random. The data matrices are generated from multivariate normal distribution with the covariance matrix corresponding to the network.

Usage

simulateData(G, etaA, n, r, dist = "mvnorm")

Arguments

G

The number of variables (vertices).

etaA

The proportion of non-null edges among all the G(G-1)/2 edges.

n

The sample size.

r

The number of replicated G by N data matrices.

dist

A function which indicates the distribution of sample. "mvnorm" is multivariate normal distribution and "mvt" is multivariate t distribution with df=2. The default is set by "mvnorm".

Value

A list containing

data

a list, each element containing an n X G matrix of simulated data.

true.partialcor

The partial correlation matrix which the datasets are generated from.

truecor.scaled

The covariance matrix calculted from the partial correlation matrix.

sig.node

The indices of nonzero upper triangle elements of partial correlation matrix.

Author(s)

Min Jin Ha

References

Schafer, J. and Strimmer, K. (2005). An empirical Bayes approach to inferring large-scale gene association networks. Bioinformatics, 21, 754–764.

Examples

 simulation <- simulateData(G = 100, etaA = 0.02, n = 50, r = 10)


GGMridge documentation built on Nov. 25, 2023, 1:08 a.m.