## Generate a bunch of SBMs, with the last one being different
num_t <- 20
block_sizes <- c(10, 5, 5)
p_ij <- list(p = 0.1, h = 0.9, q = 0.9)
P0 <- matrix(p_ij$p, 3, 3)
P0[2, 2] <- p_ij$h
PA <- P0
PA[3, 3] <- p_ij$q
num_v <- sum(block_sizes)
tsg <- replicate(num_t - 1, P0, simplify = FALSE) %>%
append(list(PA)) %>%
lapply(sample_sbm, n = num_v, block.sizes = block_sizes, directed = TRUE)
scan_stat(graphs = tsg, k = 1, tau = 4, ell = 2)
scan_stat(graphs = tsg, locality = "them", k = 1, tau = 4, ell = 2)
Run the code above in your browser using DataLab