zilgm_sim: Generate simulated data under the graph structure for ZILGM...

View source: R/network_gen.R

zilgm_simR Documentation

Generate simulated data under the graph structure for ZILGM models

Description

Generate data from zero-inflated multivariate Poisson or negative binomial distribution under given graph structure.

Usage

zilgm_sim(A, n, p, zlvs, family = c("poisson", "negbin"),
          signal, theta = NULL, noise)

Arguments

A

A p x p adjacency matrix following graph structure.

n

The number of observation to generate simulated data.

p

The number of variables or nodes to generate simulated data.

zlvs

The probability of structural zero for each variable or nodes.

family

The distribution to draw samples.

signal

The location parameter for distribution.

theta

The dispersion parameter for negative binomial distribution.

noise

The location parameter for noise distribution.

Value

A list of two elements:

A

p x p adjacency matrix of the random graph.

X

n x p simulated data.

Author(s)

Beomjin, Park.

References

Choi, H., J. Gim, S. Won, Y. J. Kim, S. Kwon, and C. Park, 2017: Network analysis for count data with excess zeros. BMC genetics, 18, no. 1, 1-10.
Park, B., H. Choi, C. Park, 2021: Negative binomial graphical model with excess zeros.

See Also

zilgm

Examples

require(ZILGM)
set.seed(1)
n = 100; p = 10; prob = 2 / p;
A = generate_network(p, prob, type = "random")
simul_dat = zilgm_sim(A = A, n = n, p = p, zlvs = 0.1, 
					  family = "negbin", signal = 1.5, theta = 0.5, noise = 0.0)

bbeomjin/ZILGM documentation built on Aug. 5, 2023, 5:52 a.m.