graph.acf: Auto Correlation Function Estimation for Graphs

Description Usage Arguments Value References Examples

View source: R/statGraph.R

Description

The function graph.acf computes estimates of the autocorrelation function for graphs.

Usage

1

Arguments

G

a list of undirected graphs (igraph type) or their adjacency matrices. The adjacency matrix of an unweighted graph contains only 0s and 1s, while the weighted graph may have nonnegative real values that correspond to the weights of the edges.

plot

logical. If TRUE (default) the graph.acf is plotted.

Value

An object of class acf.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(1)
G <- list()
p <- array(0, 100)
p[1:3] <- rnorm(3)
for (t in 4:100) {
  p[t] <- 0.5*p[t-3] + rnorm(1)
}
ma <- max(p)
mi <- min(p)
p <- (p - mi)/(ma-mi)
for (t in 1:100) {
  G[[t]] <- igraph::sample_gnp(100, p[t])
}
graph.acf(G, plot=TRUE)

statGraph documentation built on May 19, 2021, 9:11 a.m.