I have three different matrix and their Krackhardt efficiency seem wrong to me. The first two matrices are topologically equivalent, but their efficiency is different. Anyone has an explanation of the inconsistency?
For the first matrix, efficiency is 1:
A <- matrix(c(0,1,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,1,
0,0,0,0,0,0,1,0,0,0,
0,0,0,0,0,0,0,1,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0),ncol=10)
A_net <- network(A,directed=TRUE)
g_eff <- efficiency(A_net)
plot.network(A_net, vertex.col = "white", vertex.border = col_ama,
usearrows=FALSE, edge.col=col_gri, vertex.lwd = 3.5,
vertex.cex = 3.5)
title(paste("Efficiency =",round(g_eff,3)))
Equivalent matrix with different efficiency:
A <- matrix(c(0,0,0,0,1,0,0,0,0,0,
1,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,
0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,
0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0),ncol=10)
A_net <- network(A,directed=FALSE)
g_eff <- efficiency(A_net)
plot.network(A_net, vertex.col = "white", vertex.border = col_ama,
usearrows=FALSE, edge.col=col_gri, vertex.lwd = 3.5,
vertex.cex = 3.5)
title(paste("Efficiency =",round(g_eff,3)))
This third matrix has two components with the minimum number of edges (n_i-1), but their efficiency is not one. It doesn't match neither the formula in the help:
(1 - [ |E(G)| - Sum(N_i-1,i=1,..,n) ]/[ Sum((N_i-1)^2,i=1,..,n) ] = 1-[8-(2+4)]/[4+16] = .9)
Third matrix:
A <- matrix(c(0,0,0,0,1,0,0,0,0,0,
1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,
0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,
0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,
0,0,0,0,0,0,0,0,0,0),ncol=10)
A_net <- network(A,directed=FALSE)
g_eff <- efficiency(A_net)
g_eff
plot.network(A_net, vertex.col = "white", vertex.border = col_ama,
usearrows=FALSE, edge.col=col_gri, vertex.lwd = 3.5,
vertex.cex = 3.5)
title(paste("Efficiency =",round(g_eff,3)))