Learn R Programming

mlsbm

The mlsbm package fits single level stochastic block models (SBMs) and multilevel stochastic block models (MLSBMs) using efficient Gibbs sampling with Rcpp. It can also be used to efficiently sample from SBMs and MLSBMs.

Installation

The mlsbm package can be installed directly from this repository using devtools.

devtools::install_github("carter-allen/mlsbm")

Usage

# load mlsbm package
library(mlsbm)

# load included 3-layer network data
data(AL)

# fit a multilevel SBM with 3 clusters
fit <- fit_mlsbm(AL,3)

# examine the inferred clustering
table(fit$z)

Copy Link

Version

Install

install.packages('mlsbm')

Monthly Downloads

198

Version

0.99.2

License

GPL (>= 2)

Maintainer

Carter Allen

Last Published

February 7th, 2021

Functions in mlsbm (0.99.2)

sample_mlsbm

R/Rcpp function for sampling from a multilevel stochastic block model
mlsbm

mypackage: A package for fitting single and multilevel SBMs.
sample_sbm

R/Rcpp function for sampling from a single level stochastic block model
fit_sbm

R/Rcpp function for fitting single level stochastic block model
mean_CRI

The mean_CRI function
fit_mlsbm

R/Rcpp function for fitting multilevel stochastic block model
AL

Simulated 3-layer network data
col_summarize

The col_summarize function