# Weighted edges in centr\_degree?

**URL:** <https://igraph.discourse.group/t/weighted-edges-in-centr-degree/1562>\
**Category:** Usage\
**Tags:** R\
**Created:** [24 May 2023 16:14 UTC](https://igraph.discourse.group/t/weighted-edges-in-centr-degree/1562 "2023-05-24T16:14:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnnieK](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@AnnieK](https://igraph.discourse.group/u/AnnieK)\
**Post date:** [24 May 2023 16:14 UTC](https://igraph.discourse.group/t/weighted-edges-in-centr-degree/1562/1 "2023-05-24T16:14:40Z")

</div>

Hi there,

I’m calculating centrality measures on a communication network (cellphone calls) using R. In this network, an edge represents a call and I assigned weight to the edges by collapsing and summing multiple calls between the nodes. I recently discovered (newbie here) that using the strength() function is recommended for calculating node degree in a weighted network. (and hoping I understood that correctly 🤞)

Now, I have a question regarding the consideration of edge weights in centrality measures such as centr\_degree, centr\_betw, and cent\_clo. After reading the R documentation, it seems that none of these functions have an explicit argument for incorporating edge weights. Should I account for the edge weights (and directionality) when measuring centrality? If so, how?

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [24 May 2023 20:53 UTC](https://igraph.discourse.group/t/weighted-edges-in-centr-degree/1562/2 "2023-05-24T20:53:41Z")

</div>

> Now, I have a question regarding the consideration of edge weights in centrality measures such as centr\_degree, centr\_betw, and cent\_clo.

These compute _centralization_, not _centrality_. Look at `degree()`, `strength()`, `betweenness()`, `closeness()` for vertex centralities.

As for centralization: You can use `centralize()` to compute centralization from an arbitrary set of centrality scores. It’s really just a convenience function, since the computation is simple enough that you can do it in a one-liner: `sum(max(scores) - scores)` (unnormalized version).

> [@AnnieK](#):
>
> Should I account for the edge weights (and directionality) when measuring centrality?

If you mean _centralities_, this is up to you and depends on your use case. Keep in mind that different functions interpret weights in different ways: e.g. with closeness they represent edge lengths, while with eigenvector centrality they represent the “strength” of connections (equivalent to edge multiplicity).

If you mean _centralization_, keep in mind that the normalized version is computed by dividing with the largest possible centralization value for any graph with the same number of vertices. This idea won’t make sense for some weighted centrality measures. For example, closeness can be made arbitrarily large by changing only the weights (not the graph’s connectivity pattern).

---

<div class="post-metadata">

**Author:** ![AnnieK](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@AnnieK](https://igraph.discourse.group/u/AnnieK)\
**Post date:** [27 May 2023 18:32 UTC](https://igraph.discourse.group/t/weighted-edges-in-centr-degree/1562/3 "2023-05-27T18:32:57Z")

</div>

Thank you, @szhorvat! This makes perfect sense.
