gen_gaussian {SeqNet}R Documentation

Generate observations from a Gaussian graphical model.

Description

Generates data based on the multivariate normal distribution parameterized by a zero mean vector and a covariance matrix. Observations are generated for each module in the network individually, and the covariance matrix is set to the inverse of the standardized association matrix for the module. Observations are combined for gene i by taking the sum across the m_i modules containing it and dividing by sqrt(m_i).

Usage

gen_gaussian(n, ...)

Arguments

n

The number of samples to generate. If multiple networks are provided, n samples are generated per network.

...

The 'network' object(s) to generate data from. Can be a single network, many networks, or a single list of networks.

Value

A list containing the n by p matrix of samples and the 'network' object used to generate them.

References

Grimes T, Datta S (2021). “SeqNet: An R Package for Generating Gene-Gene Networks and Simulating RNA-Seq Data.” Journal of Statistical Software, 98(12), 1–49. doi: 10.18637/jss.v098.i12, https://doi.org/10.18637/jss.v098.i12.

Examples

nw <- random_network(10) # Create a random network with 10 nodes.
nw <- gen_partial_correlations(nw) # Add weights to connections in the network.
x <- gen_gaussian(20, nw)$x # Simulate 20 Gaussian observations from network. 

[Package SeqNet version 1.1.3 Index]