cerqueira.test: Andressa Cerqueira, Daniel Fraiman, Claudia D. Vargas and...

Description Usage Arguments Value References Examples

View source: R/statGraph.R

Description

Given two identically independently distributed (idd) samples of graphs G1 and G2, the test verifies if they have the same distribution by calculating the mean distance D from G1 to G2. The test rejects the null hypothesis if D is greater than the (1-alpha)-quantile of the distribution of the test under the null hypothesis.

Usage

1
cerqueira.test(G1, G2, maxBoot = 300)

Arguments

G1

the first iid sample of graphs to be compared. Must be a list of igraph objects.

G2

the second iid sample of graphs to be compared. Must be a list of igraph objects.

maxBoot

integer indicating the number of bootstrap resamples (default is 300).

Value

A list containing:

W

the value of the test.

p.value

the p-value of the test.

References

Andressa Cerqueira, Daniel Fraiman, Claudia D. Vargas and Florencia Leonardi. "A test of hypotheses for random graph distributions built from EEG data", https://ieeexplore.ieee.org/document/7862892

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
set.seed(42)

## test under H0
G1 <- G2 <- list()
for(i in 1:10){
  G1[[i]] <- igraph::sample_gnp(50,0.5)
  G2[[i]] <- igraph::sample_gnp(50,0.5)
}
k1 <- cerqueira.test(G1, G2)
k1

## test under H1
G1 <- G2 <- list()
for(i in 1:10){
  G1[[i]] <- igraph::sample_gnp(50,0.5)
  G2[[i]] <- igraph::sample_gnp(50,0.6)
}
k2 <- cerqueira.test(G1, G2)
k2

## End(Not run)

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