[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [igraph] Reciprocity function

**From**: |
Prof. Katharina Anna Zweig |

**Subject**: |
[igraph] Reciprocity function |

**Date**: |
Mon, 29 Jul 2013 16:08:38 +0200 |

**User-agent**: |
Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |

Dear all,

`for a book on network analysis I am currently looking into igraph's
``function reciprocity (in R, igraph_0.6-2). The documentation states that
``it is suitable for directed graphs:
`
http://igraph.sourceforge.net/doc/R/reciprocity.html
For fun, I used it on a directed and weighted graph:
require(igraph)
mat <- matrix(c(0,1,0,2,0,2,1,0,0), 3,3)
graph <- graph.adjacency(mat)
reciprocity(graph)
which yields 1/3

`However, as stated by the documentation, reciprocity should do the
``following:
`
sum(mat*t(mat))/sum(mat)
which would yield 2/3.

`I then thought igraph might be internally threshold the graph before
``using the reciprocity-function, so I tried:
`
graph2 <- simplify(graph)
reciprocity(graph2)
which yields 1/2.

`From a theoretical standpoint, I think that the above formula for
``reciprocity should not be applicable to a weighted graph as it would be
``very difficult to actually understand what is measured there. Anyway, it
``seems that behind the curtains, the formula is not applied, at least not
``to the weighted adjacency matrix. Can you help me to understand what is
``actually computed?
`
Best regards,
Katharina Zweig
--
Prof. Dr. Katharina A. Zweig
Complex Network Analysis and Graph Theory
Computer Science Department
University of Science and Technology
Kaiserslautern
Gottlieb-Daimler-Str. 48/672
67663 Kaiserslautern
Germany
Telephone: +49 631 205 3346
www.ninasnet.de

**[igraph] Reciprocity function**,
*Prof. Katharina Anna Zweig* **<=**