I want to define the methodology for my thesis, but RStudio obtains a different value from mine for assortativity. My graph is directed, a multigraph, and has weighted degrees. The equation that I think igraph uses (and the one I am using) is: r = frac1{sigma_o sigma_i} sum_{jk} jk (e_{jk} - q_j^o q_k^i).
My questions are: am I using the wrong formula for my type of graph? Does igraph take q°, q_i, and e_{jk} from weighted or unweighted degrees? Is there a way to know exactly which equation igraph is using to calculate the metrics?
Thanks in advance.
Can you please fix the LaTeX code and put it between $ markers so it can render properly? It’s a bit unclear what you need and I’m rushed these days, so I’d appreciate it if you did this.
igraph 1.0, which does not have an R interface released yet (work in progress) has the most flexible support for assortativity among all libraries I’m familiar with, including support for directed graphs, multigraphs and edge weights. You can read about how it works here: igraph Reference Manual
The current R interface does not consider edge weights when calculating assortativity. All functions that use edge weights will have a weight parameter, which the relevant functions don’t (but will in the upcoming release).