View source: R/stochastic_block_model.R
report_edges.sbm | R Documentation |
If this function is called on an undirected social network graph (with mode='all'), then it counts the true number of social connections between each node and the various blocks.
## S3 method for class 'sbm'
report_edges(g, prefix = "d.", mode = "all")
g |
the |
prefix |
the prefix to use in the variable names that are attached (useful if this function will be used to compute reports more than once) |
mode |
one of "all", "in", or "out". see Details |
On the other hand, if this function is called on a directed reporting graph, then it computes the reported number of social connections (with mode='in') or visibility (with mode='out').
This function is useful for computing edge counts (i.e. ) between individual vertices and the blocks. These edge counts are the building blocks of many network reporting estimators.
Since this function is based on the stochastic block model, it assumes that the groups are mutually exclusive. This could be modified in the future.
Note that, counter-intuitively, mode="in" will compute out-reports and
mode="out" will compute in-reports. This is the igraph
convention.
For undirected graphs (for example, when computing degrees in the social
network), use "all".
For example, if the prefix is "y." and the mode is "in", we are asking
report.sbm.edges
to count each vertex's number of out-reports
about each block. If we have three blocks, A, B, and C, then in the
graph that report.sbm.edges
returns, each vertex will have
four new attributes: y.degree
, y.A
, y.B
, and y.C
.
the igraph
object with new attributes affixed to each vertex
(see Details)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.