View source: R/network_distributions.R
rnet.gnm | R Documentation |
igraph::sample_gnm
to Generate Random Graph Object According to the G(n,m) Erdos-Renyi ModelCall igraph::sample_gnm
and convert the output to simcausal
network matrix.
The parameter m
of igraph::sample_gnm
is derived from n
and m_pn
as as.integer(m_pn*n)
rnet.gnm(n, m_pn)
n |
Size of the network graph (number of nodes). |
m_pn |
The total number of edges as a fraction of the sample size |
A matrix with n rows, each row lists the indices of friends connected to that particular observation.
rnet.gnp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.