Learn R Programming

cssTools (version 1.0)

s14: Calculate s14 Similarity Index

Description

Computes the $S_{14}$ similarity index between two network matrices.

Usage

s14(d1, d2)

Arguments

d1
An $n$ by $n$ matrix representing a network.
d2
An $n$ by $n$ matrix representing a network.

Value

The $S_{14}$ similarity index.

Details

Given two networks of interest, a common measure of similarity is the $S_{14}$ index introduced by Gower and Lagendre (1986). The function s14 computes this similarity measure for two networks having the same dimensions.

References

Gower, J.C., Legendre, P. (1986). Metric and Euclidean properties of dissimilarity coefficients. Journal of Classification, 3, 5-48. http://dx.doi.org/10.1007/BF01896809

See Also

sliceQuality

Examples

Run this code
# Consider two matrices representing networks, d1 and d2
d1=matrix(c(0,0,1,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0),5,5)
d2=matrix(c(0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0),5,5)

# The similarity index between d1 and d2
s14(d1,d2)

Run the code above in your browser using DataLab