gen_gaussian: Generate observations from a Gaussian graphical model.

Description Usage Arguments Value References Examples

View source: R/ggm.R

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

1

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

\insertRef

grimes21SeqNet

Examples

1
2
3
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. 

SeqNet documentation built on July 9, 2021, 9:08 a.m.