shared_partners: Shared partners

View source: R/cohesive_subgroups.R

shared_partnersR Documentation

Shared partners

Description

Shared partners

Usage

shared_partners(
  A,
  loops = FALSE,
  directed = TRUE,
  type = c("dsp", "esp", "nsp")
)

Arguments

A

A binary matrix

loops

Whether to consider the loops

directed

Whether the matrix is directed

type

Whether to return the dyad-wise (dsp) (default), edge-wise (esp) or non-edgewise (nsp) shared partners (Hunter and Handcock, 2006)

Value

This function return the distribution of shared partners.

Author(s)

Alejandro Espinosa-Rada

References

Hunter, D. R. and M. S. Handcock (2006), Inference in curved exponential family models for networks, Journal of Computational and Graphical Statistics, 15: 565– 583.

Examples

A <- matrix(c(
  0, 1, 0, 0, 0, 0,
  1, 0, 1, 1, 0, 1,
  0, 1, 0, 1, 0, 0,
  0, 1, 1, 0, 1, 1,
  0, 0, 0, 1, 0, 1,
  0, 1, 0, 1, 1, 0
), byrow = TRUE, ncol = 6)
shared_partners(A, type = "dsp")
shared_partners(A, type = "esp")
shared_partners(A, type = "nsp")

anespinosa/netmem documentation built on April 5, 2025, 5:02 p.m.