graph.cor.test {statGraph}R Documentation

Test for Association / Correlation Between Paired Samples of Graphs

Description

graph.cor.test tests for association between paired samples of graphs, using Spearman's rho correlation coefficient.

Usage

graph.cor.test(Graphs1, Graphs2)

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.

Value

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

statistic:

the value of the test statistic.

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

estimates:

the estimated measure of association 'rho'.

References

Fujita, A., Takahashi, D. Y., Balardin, J. B., Vidal, M. C. and Sato, J. R. (2017) Correlation between graphs with an application to brain network analysis. _Computational Statistics & Data Analysis_ *109*, 76-92.

Examples

set.seed(1)
G1 <- G2 <- list()

p <- MASS::mvrnorm(50, mu=c(0,0), Sigma=matrix(c(1, 0.5, 0.5, 1), 2, 2))

ma <- max(p)
mi <- min(p)
p[,1] <- (p[,1] - mi)/(ma - mi)
p[,2] <- (p[,2] - mi)/(ma - mi)

for (i in 1:50) {
  G1[[i]] <- igraph::sample_gnp(50, p[i,1])
  G2[[i]] <- igraph::sample_gnp(50, p[i,2])
}
graph.cor.test(G1, G2)


[Package statGraph version 1.0.1 Index]