generate_network | R Documentation |
Generate graph structure.
generate_network(p, prob, NofHub = 3, type = c("scale-free", "hub", "random"))
p |
The number of nodes to generate graph structure. |
prob |
The probability that the edges of the random graph appear. |
NofHub |
The number of hub nodes in hub graph. |
type |
Types of graph structure. Either a character string representing one of the graph structures. |
A p x p adjacency matrix
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.
zilgm
require(ZILGM)
set.seed(1)
p = 30; prob = 2 / p;
# Random graph
random_graph = generate_network(p, prob, type = "random")
# Scale-free graph
scale_free_graph = generate_network(p, prob, type = "random")
# Hub graph
hub_graph = generate_network(p, prob, NofHub = 3, type = "hub")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.