if (FALSE) {
set.seed(42)
## test for sets with more than one graph each under H0
G1 <- G2 <- list()
for(i in 1:10){
G1[[i]] <- as.matrix(igraph::get.adjacency(igraph::sample_gnp(50,0.6)))
G2[[i]] <- as.matrix(igraph::get.adjacency(igraph::sample_gnp(50,0.6)))
}
D1 <- ghoshdastidar.test(G1, G2)
D1
## test for sets with more than one graph each under H1
G1 <- G2 <- list()
for(i in 1:10){
G1[[i]] <- as.matrix(igraph::get.adjacency(igraph::sample_gnp(50,0.6)))
G2[[i]] <- as.matrix(igraph::get.adjacency(igraph::sample_gnp(50,0.7)))
}
D2 <- ghoshdastidar.test(G1, G2)
D2
## test for sets with only one graph each under H0
G1 <- G2 <- list()
G1[[1]] <- igraph::sample_gnp(300, 0.6)
G2[[1]] <- igraph::sample_gnp(300, 0.6)
D3 <- ghoshdastidar.test(G1, G2, two.sample= TRUE)
D3
## test for sets with only one graph each under H1
G1 <- G2 <- list()
G1[[1]] <- igraph::sample_gnp(300, 0.6)
G2[[1]] <- igraph::sample_gnp(300, 0.7)
D4 <- ghoshdastidar.test(G1, G2, two.sample= TRUE)
D4
}
Run the code above in your browser using DataLab