Learn R Programming

GGMridge (version 1.4)

simulateData: 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")

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.

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".

Author

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

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

Run the code above in your browser using DataLab