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.



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.

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")


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".

plot(caseDroppingBoot, statistics="bridgeExpectedInfluence")

bridge bootnet

plot(nonParametricBoot, statistics="bridgeExpectedInfluence")


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


Source link


Please enter your comment!
Please enter your name here