# \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)
res <- NetCPD(Ly, optns = list(boot = TRUE))
res$tau # returns the estimated change point
res$pvalAsy # returns asymptotic pvalue
res$pvalBoot # returns bootstrap pvalue
# }
Run the code above in your browser using DataLab