# \donttest{
set.seed(1)
n1 <- 100
n2 <- 100
gamma1 <- 2
gamma2 <- 3
Y1 <- lapply(1:n1, function(i) {
igraph::laplacian_matrix(igraph::sample_pa(n = 10, power = gamma1,
directed = FALSE),
sparse = FALSE)
})
Y2 <- lapply(1:n2, function(i) {
igraph::laplacian_matrix(igraph::sample_pa(n = 10, power = gamma2,
directed = FALSE),
sparse = FALSE)
})
Ly <- c(Y1, Y2)
group <- c(rep(1, n1), rep(2, n2))
res <- NetANOVA(Ly, group, optns = list(boot = TRUE))
res$pvalAsy # returns asymptotic pvalue
res$pvalBoot # returns bootstrap pvalue
# }
Run the code above in your browser using DataLab