rsm_model {multigraphr} | R Documentation |
Random stub matching model for multigraphs
Description
Given a specified degree sequence, this function finds all unique multigraphs represented by their edge multiplicity sequences. Different complexity statistics together with their probability distributions and moments are calculated.
Usage
rsm_model(deg.seq)
Arguments
deg.seq |
vector of integers representing the degree sequence of a multigraph. |
Details
The probability distributions of all unique multigraphs given fixed degree sequence, together with the first two central moments and interval estimates of the statistics M1 = number of loops and M2 = number of multiple edges, under the RSM model are calculated.
For other structural statistics and for large multigraphs,
use the IEA approximation of the RSM model via the function iea_model
Value
m.seq |
possible multigraphs represented by edge multiplicity sequences |
prob.dists |
probability distribution of the multigraphs/edge multiplicity sequences, and the probability distributions of the statistics number of loops, number of multiple edges, and simple graph (logical) for each multigraph |
M |
summary of moments and interval estimates for
number of loops and number of multiple edges ( |
Author(s)
Termeh Shafie
References
Shafie, T. (2015). A Multigraph Approach to Social Network Analysis. Journal of Social Structure, 16.
Shafie, T. (2016). Analyzing Local and Global Properties of Multigraphs. The Journal of Mathematical Sociology, 40(4), 239-264.
See Also
get_degree_seq
, get_edge_multip_seq
, iea_model
Examples
# Given a specified degree sequence
D <- c(2, 2, 3, 3) # degree sequence
mod1 <- rsm_model(D)
mod1$m.seq
mod1$prob.dists
mod1$M
# Given an observed graph
A <- matrix(c(
0, 1, 2,
1, 2, 1,
2, 1, 2
), nrow = 3, ncol = 3)
D <- get_degree_seq(adj = A, type = "graph")
mod2 <- rsm_model(D)