random_network {SeqNet} | R Documentation |
Create a network object.
Description
Creates an unweighted 'network' object containing randomly generated
modules.
Usage
random_network(p, n_modules = NULL, ...)
Arguments
p |
The number of nodes in the network. If p is much larger than
10^4, computation may begin to slow depending on the average module size and
the amount of overlap among modules.
|
n_modules |
The number of modules to include in the network. If
NULL , then modules are created until all nodes in the network have
positive degree.
|
... |
Arguments to be passed to other methods. Possible arguments
include:
nu |
A value between 0 and 1 used to control the amount of overlap among
modules. Smaller values result in less overlap. Used in
sample_module_nodes . |
prob_rewire |
The probability of removing a connection from the local network
structure; this is applied to each edge created. Used in
random_module_structure . |
prob_remove |
The probability of rewiring a connection from the local network
structure; this is applied every connection of each node. See
random_module_structure . |
neig_size |
The initial degree of each node when constructing the ring lattice.
See random_module_structure . |
alpha |
A positive value used to parameterize the Beta distribution used
to sample nodes based on their degree. Larger values will place more weight
on highly connected nodes. See random_module_structure . |
beta | A positive value used to parameterize the Beta distribution used
to sample nodes based on their degree. Set to 1 by default. Increasing this
parameter will cause the sampling to favor moderately connected nodes over
the extreme tail of highly connected nodes.
See random_module_structure . |
epsilon | A small constant added to the sampling probability of each node.
See random_module_structure . |
avg_module_size |
See create_modules_for_network . |
sd_module_size |
See create_modules_for_network . |
min_module_size |
See create_modules_for_network . |
max_module_size |
See create_modules_for_network . |
|
|
Value
An unweighted network object.
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
# Create a random network of 10 nodes
nw <- random_network(10)
nw
# Add a random weight to each connection.
nw <- gen_partial_correlations(nw)
# Plot the network
plot(nw)
[Package
SeqNet version 1.1.3
Index]