Package 'SVN'

Title: Statistically Validated Networks
Description: Determines networks of significant synchronization between the discrete states of nodes; see Tumminello et al <doi:10.1371/journal.pone.0017994>.
Authors: Damien Challet
Maintainer: Damien Challet <[email protected]>
License: GPL (>= 2.0)
Version: 1.0.1
Built: 2024-10-25 03:31:08 UTC
Source: https://github.com/cran/SVN

Help Index


Statistically validated networks

Description

Statistically validated networks are built from the states of nodes and from their curious (statistically speaking) synchronization: two nodes are linked if their states are anomalously synchronized. The associated null hypothesis is that the states of nodes are Poissonian processes, i.e., independent from each other.

Details

The main function SVN_links expects a matrix/data.frame/data.table of states, the line number being the index and while a given column corresponds to a given node, and outputs the results network in an igraph format. A Multiple Hypothesis Testing correction is applied since one performs several (rather, many) tests. It is then up to the user to use some network clustering technique if needed. For the convenience of the user, the function SVN_clusters applies the infoMap or Louvain method to the output of SVN_links and returns the resulting clustering. For small enough timeseries, it may be useful to use the options(svn.memoise=TRUE) so as to avoid expensive calls to the phyper function.

Author(s)

Maintainer: Damen Challet <[email protected]>

References

Tumminello, M., Micciche, S., Lillo, F., Piilo, J., & Mantegna, R. N. (2011). Statistically validated networks in bipartite complex systems. PloS one, 6(3), e17994.

See Also

igraph

Examples

x=sample(c(1,0),1000,replace = TRUE)   # random vector of 0s and 1s
 xx=x; x[1]=1-x[1]   # one modifies just one element. x and xx are very similar
 x_rev=rev(x)        # x and x_rev are not
 y=sample(c(1,0),1000,replace = TRUE)   # y is another random vector of 0s and 1s
 M=cbind(x,xx,x_rev,y)                  # builds the matrix of states
 mylinks=SVN_links(M)
 print(mylinks)

 # one can compute clusters as well
 myclusters=SVN_clusters(mylinks)

Find clusters in Statistically Validated Networks

Description

Find clusters in Statistically Validated Networks

Usage

SVN_clusters(links, cluster.method = "infomap")

Arguments

links

an object obtained from the SVN_links function

cluster.method

a string, either "infomap" or "louvain", that selects the clustering method

Value

an igraph communities object

Examples

M=matrix(rbinom(200,size = 1,0.5),nrow=50)
mylinks=SVN_links(M)
# no links, then
print(mylinks)

# another example
x=c(1,0,0,0,0,0,1,1,1,1,0,0)
xx=c(1,1,0,0,0,0,1,1,1,1,0,0)
xrev=rev(x)
w=sample(x,length(x))
M=rbind(x,xx,xrev,w)
mylinks=SVN_links(M)

## if one wants clusters as well
myclusters=SVN_clusters(mylinks)