graph.cor.test: Test for Association / Correlation Between Paired Samples of...

Description Usage Arguments Value References Examples

View source: R/statGraph.R

Description

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

Usage

1

Arguments

x

a list of adjacency matrices. For unweighted graphs, each matrix contains only 0s and 1s. For weighted graphs, each matrix may contain nonnegative real values that correspond to the weights of the edges.

y

a list with the same length of 'x'. It is list of adjacency matrices. For unweighted graphs, each matrix contains only 0s and 1s. For weighted graphs, each matrix may contain nonnegative real values that correspond to the weights of the edges.

Value

statistic

the value of the test statistic.

p.value

the p-value of the test.

estimate

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<e2><80><93>92.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require(igraph)
x <- list()
y <- 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) {
    x[[i]] <- get.adjacency(erdos.renyi.game(50, p[i,1]))
    y[[i]] <- get.adjacency(erdos.renyi.game(50, p[i,2]))
}

graph.cor.test(x, y)

statGraph documentation built on May 29, 2017, 9:08 a.m.