NaN in small worldness

Home Forums Bugs NaN in small worldness

This topic contains 1 reply, has 2 voices, and was last updated by  Mite Mijalkov 2 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26066 Reply

    Allison Chen


    I am using the braph to calculate the small-worldness. when the density<40, the small worldness is NaN. I guess when we get a disconnected node, the path length goes to infinity (this is intuitive I think). We may need to use the harmonic mean to avoid this. Could you please revise the source code to avoid this? Besides, when comparing the nodal measures for two groups, the p-values for different measures are different, but the fdr are always the same. Why does this happen? Thanks!


    #26326 Reply

    Mite Mijalkov

    Hi Allison,

    Thank you for using Braph. I hope that you will find it useful during the course of your research.

    Regarding the p-values for between group comparison: The fdr column represents the highest p-value that is significant after fdr correction. This value is calculated at a given density, among the multiple comparisons performed between all regions. That is why, when the region changes, the fdr value stays the same. However, since the multiple comparisons are different for each region, the associated uncorrected p-value changes. We discussed this issue previously on this forum and you can find more detailed explanations at: and .

    Regarding the small worldness calculation, you are right. This situation happens when the network is unconnected. Practically, this results in NaN for the path length of the disconnected nodes which then affects the calculation of the mean. To help you with this, could you let me know what type of analysis you are running (weighted or binary undirected (or directed from the command line) so that I can send you a list of changes that need to be done in order to get the harmonic mean.

    Hope these explanations help. If you need any additional help, please do not hesitate to ask.


    • This reply was modified 2 months, 3 weeks ago by  Mite Mijalkov.
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: NaN in small worldness
Your information: