# Bonacich Alpha Centrality Problems

**URL:** <https://igraph.discourse.group/t/bonacich-alpha-centrality-problems/1152>\
**Category:** Usage\
**Tags:** R\
**Created:** [22 March 2022 17:36 UTC](https://igraph.discourse.group/t/bonacich-alpha-centrality-problems/1152 "2022-03-22T17:36:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeloMicro1945](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@TeloMicro1945](https://igraph.discourse.group/u/TeloMicro1945)\
**Post date:** [22 March 2022 17:36 UTC](https://igraph.discourse.group/t/bonacich-alpha-centrality-problems/1152/1 "2022-03-22T17:36:34Z")

</div>

I am applying the Bonacich Alpha Centrality in iGraph for R and I get unexpected results. The input data consist of a series of row stochastic adjacency matrices with positive elements. That is, row stochastic means the elements for the full matrix are normalized so the row elements sum to 1.0. The data are undirected, hence each matrix is symmetric around a diagonal filled with zeroes.

I input the upper triangle of the matrix only. QUESTION: is that correct, or should I have entered both the upper and lower triangles of the matrix? I tell IGraph that the matrix is undirected.

According to the Perron-Frobenius Theorem, the largest eigenvalue for my row-stochastic matrices should be 1. So if use alpha=0.50, then the alpha centralities should be positive, since they capture the number of paths of all lengths passing through a node, if the node is connected. And yet I get negative alpha centralities in some cases. What am I doing wrong and how do I resolve this?

Thanks for your help. Yours Stumped in Florida

---

<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:** [22 March 2022 18:22 UTC](https://igraph.discourse.group/t/bonacich-alpha-centrality-problems/1152/2 "2022-03-22T18:22:31Z")

</div>

Please show a complete minimal code example (as small as possible). See here for guidance: [How to create a Minimal, Reproducible Example - Help Center - Stack Overflow](https://stackoverflow.com/help/minimal-reproducible-example) This will make it easier for us to understand what you are doing and to comment on it.

---

<div class="post-metadata">

**Author:** ![TeloMicro1945](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@TeloMicro1945](https://igraph.discourse.group/u/TeloMicro1945)\
**Post date:** [22 March 2022 19:44 UTC](https://igraph.discourse.group/t/bonacich-alpha-centrality-problems/1152/3 "2022-03-22T19:44:01Z")

</div>

I’ll construct a small sample. This will take a little time to do.
