struct_equiv: Structural Equivalence

View source: R/struct_equiv.R

struct_equivR Documentation

Structural Equivalence

Description

Computes structural equivalence between ego and alter in a network

Usage

struct_equiv(graph, v = 1, inf.replace = 0, groupvar = NULL, ...)

## S3 method for class 'diffnet_se'
print(x, ...)

Arguments

graph

Any class of accepted graph format (see netdiffuseR-graphs).

v

Numeric scalar. Cohesion constant (see details).

inf.replace

Deprecated.

groupvar

Either a character scalar (if graph is diffnet), or a vector of size n.

...

Further arguments to be passed to approx_geodesic (not valid for the print method).

x

A diffnet_se class object.

Details

Structure equivalence is computed as presented in Valente (1995), and Burt (1987), in particular

% SE_{ij} = \frac{(dmax_i - d_{ji})^v}{\sum_{k\neq i}^n(dmax_i-d_{ki})^v}

with the summation over k\neq i, and d_{ji}, Eucledian distance in terms of geodesics, is defined as

% d_{ji} = \left[(z_{ji} - z_{ij})^2 + \sum_k^n (z_{jk} - z_{ik})^2 + \sum_k^n (z_{ki} - z_{kj})^2\right]^\frac{1}{2}

with z_{ij} as the geodesic (shortest path) from i to j, and dmax_i equal to largest Euclidean distance between i and any other vertex in the network. All summations are made over k\not\in \{i,j\}

Here, the value of v is interpreted as cohesion level. The higher its value, the higher will be the influence that the closests alters will have over ego (see Burt's paper in the reference).

Structural equivalence can be computed either for the entire graph or by groups of vertices. When, for example, the user knows before hand that the vertices are distributed accross separated communities, he can make this explicit to the function and provide a groupvar variable that accounts for this. Hence, when groupvar is not NULL the algorithm will compute structural equivalence within communities as marked by groupvar.

Value

If graph is a static graph, a list with the following elements:

SE

Matrix of size n\times n with Structural equivalence

d

Matrix of size n\times n Euclidean distances

gdist

Matrix of size n\times n Normalized geodesic distance

In the case of dynamic graph, is a list of size t in which each element contains a list as described before. When groupvar is specified, the resulting matrices will be of class dgCMatrix, otherwise will be of class matrix.

Author(s)

George G. Vega Yon & Thomas W. Valente

References

Burt, R. S. (1987). "Social Contagion and Innovation: Cohesion versus Structural Equivalence". American Journal of Sociology, 92(6), 1287–1335. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1086/228667")}

Valente, T. W. (1995). "Network models of the diffusion of innovations" (2nd ed.). Cresskill N.J.: Hampton Press.

See Also

Other statistics: bass, classify_adopters(), cumulative_adopt_count(), dgr(), ego_variance(), exposure(), hazard_rate(), infection(), moran(), threshold(), vertex_covariate_dist()

Examples

# Computing structural equivalence for the fakedata -------------------------
data(fakesurvey)

# Coercing it into a diffnet object
fakediffnet <- survey_to_diffnet(
   fakesurvey, "id", c("net1", "net2", "net3"), "toa", "group"
)

# Computing structural equivalence without specifying group
se_all <- struct_equiv(fakediffnet)

# Notice that pairs of individuals from different communities have
# non-zero values
se_all
se_all[[1]]$SE

# ... Now specifying a groupvar
se_group <- struct_equiv(fakediffnet, groupvar="group")

# Notice that pairs of individuals from different communities have
# only zero values.
se_group
se_group[[1]]$SE




srdyal/diffusiontest documentation built on Dec. 9, 2024, 1:14 a.m.