Bootstrapping bridge centrality using the bootnet package

In network science, analyzing centrality is the primary method for determining node importance. There are many different types of centrality, and the appropriateness of a centrality analysis depends on the type of network you are using and how you define node importance. Bridge centrality is a set of statistics that measures the importance of nodes in connecting two or more meaningful groups (for example, connecting two mental disorders or two domains of personality).

bridge nodes

There are multiple types of bridge centrality, but I highly recommend you use bridge expected influence for psychological networks. If you’d like to see a relevant example, Heeren and colleagues used bridge expected influence to measure the overlap between social anxiety and depression.

But there are plenty of problems when it comes to centrality analysis in psychological networks. Chief among these problems is stability — we want to ensure that our centrality estimates reflect real variance in the network, rather than picking up on noise.

Providing accurate stability estimates for bridge centrality has been a consistent challenge since the bridge() function rolled out around 2 years ago. No longer! With the latest update to the bootnet package, it is now possible to bootstrap bridge centrality in just a few lines of code.

First you will want to update the bootnet package to its newest version. We’ll also load the psych package (for some relevant data to play around with) and the qgraph and networktools packages for plotting purposes.

update.packages("bootnet")
require(bootnet)
require(qgraph)

require(networktools)
require(psych)

We’ll load up the bfi dataset, which includes data on the Big Five personality traits. To demonstrate, let’s focus on a subset of the network: Extraversion and Agreeableness.

data(bfi)
bfi <- bfi[,c(1:5,11:15)]
bfi <- reverse.code(c(-1,1,1,1,1,-1,-1,1,1,1),bfi)

First, we want to define the communities. The way we’ve structured the data, the first 5 items measure agreeableness, and the next five measure extraversion.

communitiesBfi <- list("Agreeableness"=1:5, "Extraversion"=6:10)

Let’s estimate the network and make a plot:

myNetwork <- estimateNetwork(bfi,default="pcor")
MDSnet(qgraph(myNetwork$graph,groups=communitiesBfi,palette="pastel"))

network-2

Once the network is estimated with estimateNetwork, bootstrapping is just 1 line of code!

caseDroppingBoot <- bootnet(myNetwork,boots=1000,type="case", statistics="all", communities=communitiesBfi)

The same goes for a nonparametric bootstrap:

nonParametricBoot <- bootnet(myNetwork,boots=1000,type="nonparametric", statistics="all", communities=communitiesBfi)

There are two important things to notice here. First is to set statistics="all". This ensures that bootnet will calculate bridge centrality internally. The second thing is to include the communities argument! If you don’t, the function will have no idea where the communities end and begin.

Once you are done bootstrapping, you can do all the fun things that you normally do with bootnet, like calculating stability coefficients and plotting. Make sure to pay attention to what you are asking for with the statistics argument — somehow this is something I always seem to forget. If you want to call a specific type of bridge centrality, the shortcuts are "bridgeExpectedInfluence", "bridgeStrength", "bridgeCloseness", and "bridgeBetweenness".

corStability(caseDroppingBoot)
plot(caseDroppingBoot, statistics="bridgeExpectedInfluence")

bridge bootnet

plot(nonParametricBoot, statistics="bridgeExpectedInfluence")

confidence-1

plot(nonParametricBoot, statistics="bridgeExpectedInfluence", plot="difference")

diff-1

6 thoughts on “Bootstrapping bridge centrality using the bootnet package”

  1. Hi there! Does the bridgeExpectedInfluence parameter refer to the 1-step variant? What about the 2-step variant and its stability?

    Like

    1. Yes, it does refer to the 1-step variant. For bootnet, only 1-step bridgeExpectedInfluence is implemented. There were a couple of reasons for this decision — first, in almost all of the networks that have been looked at, 1-step and 2-step are very highly correlated (>.9), so 2-step doesn’t really add much. Second, it tends to be unstable, so it would only work in tremendously large samples.

      Like

  2. Thank you very much to begin with!
    Is there a possibility to bootstrap brige values as describef for a subset of the network?
    I have a big network with 90 SCL-R nodes but am particularily interested in the node connection within two disorder specific communities within the whole network.

    Like

    1. Yes! You will need to use the useCommunities argument in your bootnet() call. For example, something like this:

      bootnet(…, statistics = “all”, communities = communitiesBfi, useCommunities = c(“Agreeableness”, “Extraversion”))

      Like

  3. Is there a way to organize the difference plot by bridge centrality value from highest to lowest? I can’t seem to find an argument for it in the plot function. Thanks!

    Like

Leave a comment