powered by
This function allows you to fit multilevel stochastic block models.
fit_mlsbm( A, K, a0 = 0.5, b10 = 0.5, b20 = 0.5, n_iter = 1000, burn = 100, verbose = TRUE )
An adjacency list of length L, the number of levels. Each level contains an n x n symmetric adjacency matrix.
The number of clusters specified a priori.
Dirichlet prior parameter for cluster sizes for clusters 1,...,K.
Beta distribution prior paramter for community connectivity.
Beta distribution prior parameter for community connectivity.
The number of total MCMC iterations to run.
The number of burn-in MCMC iterations to discard. The number of saved iterations will be n_iter - burn.
Whether to print a progress bar to track MCMC progress. Defaults to true.
A list of MCMC samples, including the MAP estimate of cluster indicators (z)
# NOT RUN { data(AL) # increase n_iter in practice fit <- fit_mlsbm(AL,3,n_iter = 100) # }
Run the code above in your browser using DataLab