adja | R Documentation |
This function generates a network from the Stochastic Block Model with K
blocks.
adja(N, K, alpha, directed = FALSE)
N |
The number of nodes on the network. |
K |
The number of blocks. Each block has dimension |
alpha |
The network density. A value in |
directed |
Logical scalar, whether to generate a directed network or not. If TRUE a directed network is generated. |
For each pair of nodes it performs a Bernoulli trial with values 1 "draw an edge", 0 "otherwise".
The probabilities of these trials are bigger if the two nodes are in the same block, lower otherwise, and they are specified based on the number of nodes on the network N
and network density alpha
:
Probability to draw an edge for a pair of nodes in the same block: \alpha*N^{-0.3}
.
Probability to draw an edge for a pair of nodes in different blocks: \alpha*N^{-1}
.
A row-normalized non-negative matrix describing the network. The main diagonal entries of the matrix are zeros, all the other entries are non-negative and the sum of elements over the rows equals one.
Mirko Armillotta, Michail Tsagris and Konstantinos Fokianos.
Faust, K. and S. Wasserman (1992). Blockmodels: Interpretation and evaluation. Social Networks, 14, 5–61.
adja_gnp
W <- adja(N = 20, K = 5, alpha = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.