Description Usage Arguments Value Author(s) References Examples
For a given graph, computes the size of the largest connex component, degree, minimum path length and clustering coefficient.
1 2 | small.world(wave.adj.mat, dat = "reduced", distance = "norm",
coord = 0, export.data = FALSE)
|
wave.adj.mat |
adjacency matrix of the graph to be analysed. |
dat |
character, if |
distance |
matrix with a distance associated to each pair of nodes of the graph to take into account in the computation of the small-world parameters. By default, the matrix of the distance has a value of 1 in each entry. |
coord |
optional vector containing the coordinate of the nodes of the graph. |
export.data |
logical. If TRUE the correlation matrices with the upper and lower bound are exported to text file. |
in.degree.mean |
real corresponding to the mean of the degree of all the nodes of the graph. |
in.degree |
vector containing the degree of each node of the graph. |
Lp.mean |
real corresponding to the mean of minimum path length for each node belonging to the largest connex component of the graph only. |
Lp |
vector containing the mean minimum path length for each node of the graph. (the computaion of Lp requires at least one neighbourgh per node, if it is not the case the value of Lp is equal to -1) |
Cp.mean |
real corresponding to the mean of clustering coefficient for each node belonging to the largest connex component of the graph only. |
Cp |
vector containing the clustering coefficient for each node of the graph. (the computaion of Cp requires at least two neighbourghs per node, if it is not the case the value of Cp is equal to -1) |
size.large.connex |
real corresponding to the size of the largest connex component. |
S. Achard
D. J. Watts and S. H. Strogatz (1998) Collective dynamics of “small-world” networks. Nature, Vol. 393, pages 440-442.
S. H. Strogatz (2001) Exploring complex networks. Nature, Vol. 410, pages 268-276.
S. Achard, R. Salvador, B. Whitcher, J. Suckling, Ed Bullmore (2006) A Resilient, Low-Frequency, Small-World Human Brain Functional Network with Highly Connected Association Cortical Hubs. Journal of Neuroscience, Vol. 26, N. 1, pages 63-72.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # fig 3 of Achard (2006)
data(brain)
brain<-as.matrix(brain)
# WARNING : To process only the first five regions
brain<-brain[,1:5]
#Construction of the correlation matrices for each level of the wavelet decomposition
wave.cor.list<-const.cor.list(brain, method = "modwt" ,wf = "la8", n.levels = 6,
boundary = "periodic", p.corr = 0.975)
sup.seq<-((1:10)/10) #sequence of the correlation threshold
nmax<-length(sup.seq)
in.degree.mean<-matrix(0,6,nmax)
n.levels<-6
#For each value of the correlation thrashold
for(i in 1:nmax){
n.sup<-sup.seq[i]
#Construction of the adjacency matrices associated to each level of the wavelet decomposition
wave.adj.list<-const.adj.list(wave.cor.list, sup = n.sup, proc.length=dim(brain)[1])
#For each level of the wavelet decomposition
for(j in 1:n.levels){
param.sw.brain<-small.world(wave.adj.list[[j]],dat="reduced")
in.degree.mean[j,i]<-param.sw.brain$in.degree.mean
}}
#Plots of the average in-degree in terms of the scale
n.regions<-dim(brain)[2]
plot(sup.seq,(1:nmax)/2,type='n',xlab='Correlation threshold, R',ylab='Mean degree, k',
cex.axis=2,cex.lab=2,xlim=c(0,1),ylim=c(0,90))
for(i in 1:n.levels){
lines(sup.seq,in.degree.mean[i,],type='l',col=i,lwd=2)
}
lines(sup.seq,rep(log(n.regions),nmax))
legend(x="topright",legend=c("Level 1","Level 2","Level 3","Level 4",
"Level 5","Level 6"),col=(1:n.levels),lwd=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.