ssi: Spectral Segregation Index for Social Networks

Description Usage Arguments Details Value References See Also Examples

View source: R/ssi.R

Description

These functions implement Spectral Segregation Index as proposed by Echenique & Fryer (2006). This index is a node-level measure of segregation in a given network.

Usage

1
ssi(g, vattr)

Arguments

g

object of class "igraph" representing a network

vattr

character, name of the vertex attribute

Details

For a full description and axiomatization see Echenique & Fryer (2006).

The network g is converted to adjacency matrix and normalized so that all rows sum-up to 1.

The procedure essentially consists of creating a submatrix, say, B of the adjacency matrix, say A. This submatrix B contains only vertices of the given type. It may be viewed as a type-homogeneous subnetwork of A. This subnetwork is further decomposed into connected components. Then, for every component, an eigenvalue decomposition is applied. The value of the index for the component is simply the largest eigenvalue, and the individual-level indices are obtained by distributing it according to the corresponding eigenvector.

Value

Named vector of individual level values of SSI. Names correspond to vertex ids in g.

References

Echenique, Federico and Roland G. Fryer, Jr. (2006) A Measure of Segregation Based On Social Interactions

See Also

Other segregation measures: assort, coleman, ei, freeman, gamix, orwg, smi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
if( require(igraph, quietly = TRUE)) {

### artificial EF data
x <- ssi(EFnet, "type")
x

# show it on picture
a <- V(EFnet)$type
# rescale SSI values to use as shades of gray
k <- 1 - scale(x, center=min(x), scale=max(x) - min(x))
plot( EFnet, layout=layout.fruchterman.reingold,
    vertex.color= gray(k),
    vertex.label.family="",
    vertex.shape=c("circle", "square")[a],
   vertex.label.color=gray( (1-k) > .4 ) )

### For White's kinship data
x <- ssi(Wnet, "gender")
x
# plot it
a <- V(Wnet)$gender
k <- 1 - scale(x, center=min(x), scale=max(x) - min(x))
set.seed(1234)
plot( Wnet, layout=layout.fruchterman.reingold,
    main="Node segregation in White's kinship data",
    vertex.label.family="",
    vertex.label=V(Wnet)$name,
    vertex.color= gray(k),
    vertex.shape=c("circle", "csquare")[a],
    vertex.label.color="black")
legend( "topleft", legend=c("Men", "Women"), pch=c(0,1), col=1)

}

mbojan/isnar documentation built on Feb. 18, 2021, 4:38 a.m.