graph.takahashi.test {statGraph}R Documentation

Test for the Jensen-Shannon Divergence Between Graphs

Description

graph.takahashi.test tests whether two sets of graphs were generated by the same random graph model. This bootstrap test is based on the Jensen-Shannon (JS) divergence between graphs.

Usage

graph.takahashi.test(Graphs1, Graphs2, maxBoot = 1000, dist = "JS", ...)

Arguments

Graphs1

a list of undirected Graphs. If each graph has the attribute eigenvalues containing its eigenvalues , such values will be used to compute their spectral density.

Graphs2

a list of undirected Graphs. If each graph has the attribute eigenvalues containing its eigenvalues , such values will be used to compute their spectral density.

maxBoot

integer indicating the number of bootstrap resamplings (default 1000).

dist

string indicating if you want to use the 'JS' (default) , 'L1' or 'L2' distances. 'JS' means Jensen-Shannon divergence.

...

Other relevant parameters for graph.spectral.density.

Details

Given two lists of graphs, Graphs1 and Graphs2, graph.takahashi.test tests H0: 'JS divergence between Graphs1 and Graphs2 is 0' against H1: 'JS divergence between Graphs1 and Graphs2 is larger than 0'.

Value

A list with class 'htest' containing the following components:

statistic:

the value of the Jensen-Shannon divergence (default), L1 or L2 between 'Graphs1' and 'Graphs2'.

p.value:

the p-value of the test.

method:

a string indicating the used method.

data.name:

a string with the data's name(s).

References

Takahashi, D. Y., Sato, J. R., Ferreira, C. E. and Fujita A. (2012) Discriminating Different Classes of Biological Networks by Analyzing the Graph Spectra Distribution. _PLoS ONE_, *7*, e49949. doi:10.1371/journal.pone.0049949.

Silverman, B. W. (1986) _Density Estimation_. London: Chapman and Hall.

Sturges, H. A. The Choice of a Class Interval. _J. Am. Statist. Assoc._, *21*, 65-66.

Sheather, S. J. and Jones, M. C. (1991). A reliable data-based bandwidth selection method for kernel density estimation. _Journal of the Royal Statistical Society series B_, 53, 683-690. http://www.jstor.org/stable/2345597.

Examples

set.seed(1)
G1 <- G2 <- list()
for (i in 1:20) {
  G1[[i]] <- igraph::sample_gnp(n=50, p=0.500)
}
for (i in 1:20) {
  G2[[i]] <- igraph::sample_gnp(n=50, p=0.512)
}
result <- graph.takahashi.test(G1, G2, maxBoot=500)
result


[Package statGraph version 1.0.3 Index]