Skip to contents

Second-zone multilevel sampling considering a second-mode focal actor

Usage

zone_sample(A, X, ego = TRUE, core = FALSE)

Arguments

A

A symmetric matrix object.

X

X an incidence matrix object.

ego

Whether to add or not ego into the subgraph.

core

Whether to add actors at distance one from ego

Value

This function return a list of second-zone subgraphs using as a focal actor the second-mode of the multilevel network.

References

Espinosa-Rada, A. (2021). A Network Approach for the Sociological Study of Science: Modelling Dynamic Multilevel Networks. [PhD]. The University of Manchester.

Author

Alejandro Espinosa-Rada

Examples


A <- matrix(c(
  0, 1, 0, 0, 0, 0, 0, 0,
  0, 0, 1, 0, 0, 0, 0, 0,
  0, 1, 0, 1, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 1, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0
), byrow = TRUE, ncol = 8)
colnames(A) <- c("1", "2", "3", "4", "5", "6", "7", "8")
rownames(A) <- c("1", "2", "3", "4", "5", "6", "7", "8")

X <- matrix(c(
  1, 0, 0, 0,
  1, 0, 0, 0,
  1, 0, 1, 0,
  0, 1, 1, 0,
  0, 1, 1, 1,
  0, 1, 0, 0,
  0, 0, 0, 0,
  0, 0, 0, 1
), byrow = TRUE, ncol = 4)
colnames(X) <- c("a", "b", "c", "d")
rownames(X) <- c("1", "2", "3", "4", "5", "6", "7", "8")

set.seed(18051889)
zone_sample(A, X, core = TRUE)
#> $a
#> IGRAPH 547747f DN-- 7 16 -- 
#> + attr: name (v/c), core (v/n)
#> + edges from 547747f (vertex names):
#>  [1] 1->2 1->a 2->3 2->a 3->2 3->4 3->a 3->c 4->b 4->c a->1 a->2 a->3 b->4 c->3
#> [16] c->4
#> 
#> $b
#> IGRAPH c6b780e DN-- 8 18 -- 
#> + attr: name (v/c), core (v/n)
#> + edges from c6b780e (vertex names):
#>  [1] 3->4 3->a 3->c 4->b 4->c 5->b 5->c 5->d 6->4 6->b a->3 b->4 b->5 b->6 c->3
#> [16] c->4 c->5 d->5
#> 
#> $c
#> IGRAPH b531402 DN-- 9 22 -- 
#> + attr: name (v/c), core (v/n)
#> + edges from b531402 (vertex names):
#>  [1] 2->3 2->a 3->2 3->4 3->a 3->c 4->b 4->c 5->b 5->c 5->d 6->4 6->b a->2 a->3
#> [16] b->4 b->5 b->6 c->3 c->4 c->5 d->5
#> 
#> $d
#> IGRAPH 25b5142 DN-- 5 8 -- 
#> + attr: name (v/c), core (v/n)
#> + edges from 25b5142 (vertex names):
#> [1] 5->b 5->c 5->d 8->d b->5 c->5 d->5 d->8
#>