Skip to content

Software

JNIRM

Relationships among teachers are known to influence their teaching-related perceptions, and the paper studies whether and how teachers' advising relationships (networks) are related to their perceptions of satisfaction, students, and influence over educational policies, recorded as responses to a questionnaire (item responses). The Joint Network and Item Response Model (JNIRM) is a joint model of network and item responses with correlated latent variables that allows the analyst to test and interpret the dependence between a network and item responses. In the paper, teachers' advising relationships contribute to their perceptions of satisfaction and students more often than their perceptions of influence over educational policies.

The package takes an N × N social network (adjacency) matrix and an N × P item response matrix, and produces joint latent positions for the network and the response items from which the dependence between the two data sources can be tested and interpreted. It includes model fitting, cross-validation, and goodness-of-fit evaluation of both the network and response components.

Code: GitHub Repository

Paper: Wang, S., Sweet, T. M., & Paul, S. (2026). The co-varying ties between networks and item responses via latent variables. Psychometrika, 91(2), 641–668.

jlsm

In social, behavioral, and economic sciences, researchers often study a social network among a group of individuals together with high-dimensional attribute measurements, such as questionnaire responses. The joint latent space model (JLSM) summarizes the network and the multivariate attributes in a single person–attribute joint latent space, estimated with a Variational Bayesian EM algorithm. This allows effective integration, informative visualization, and prediction of social networks and attributes. In the paper, JLSM is applied to the French financial elites and reveals a division in their social circles in accordance with differences in career, political views, and social status.

The package takes an N × N social network adjacency matrix and an N × P matrix of multivariate attribute measurements, and produces joint latent positions for persons and attributes from which both data sources can be jointly visualized, estimated, and predicted. It builds on lvm4net and supports posterior sampling, visualization, and prediction workflows.

Code: GitHub Repository

Paper: Wang, S., Paul, S., & De Boeck, P. (2023). Joint latent space model for social networks with multivariate attributes. Psychometrika, 88(4), 1197–1227.

ABCModel

Group-level brain structural connectivity is commonly summarized by entry-wise sample means or medians across individual connectivity matrices, which ignores the associations among structural connections and the topological properties of brain networks. The Attributes-informed Brain Connectivity (ABC) model is a latent space-based generative network model that offers an interpretable latent space representation of the group-level connectivity, incorporates the anatomical knowledge of nodes and tests its co-varying relationship with connectivity, and quantifies the uncertainty of the estimated group-level effects. A novel Bayesian MCMC algorithm estimates the model, and in the paper it identifies meaningful sex-specific network neuromarkers for Alzheimer's disease.

The package takes a list of V × V brain connectivity matrices (X) and a list of V × P region-level attribute matrices (Y), along with covariate matrices for the connectivity (W) and attribute (H) data, and produces a group-level estimate of connectivity informed by the attributes, with a tunable latent dimension K for the multiplicative attribute effects. Simulated example data and code are included.

Code: GitHub Repository

Paper: Wang, S., Wang, Y., Xu, F. H., Shen, L., Zhao, Y., & Alzheimer's Disease Neuroimaging Initiative. (2025). Establishing group-level brain structural connectivity incorporating anatomical knowledge under latent space modeling. Medical Image Analysis, 99, 103309.

Tutorial: ABC Model Tutorial

Simulation Example: Example Files

Example Code: Code Examples

LatentSNA

LatentSNA addresses the lack of statistical power and inflated type II errors in current analytic approaches for detecting imaging biomarkers. It implements network science in a generative Bayesian framework that preserves neurologically meaningful brain topology, improving statistical power for imaging biomarker detection. It enables unbiased estimation of the influence of biomarkers on behavioral variants, quantifies the uncertainty of those effects and evaluates their likelihood against chance, and improves brain–behavior prediction in new samples across multiple imaging modalities and outcome measures.

The package takes a list of V × V brain connectivity matrices (X) and an N × P outcome matrix (Y). It estimates the latent variable values for each participant that characterize their individual connectivity, estimates the covariances between the connectome and the behaviors with 95% credible intervals, tests whether the connectivity of a brain region is related to the behaviors, and predicts both connectivity and behavior in new samples. Simulated example data—a list of V × V connectivity matrices (X) and an N × P outcome matrix (Y)—are included for demonstration.

Code: GitHub Repository

Paper: Wang, S., Zhang, X., Liu, Y., Xu, W., Tian, X., & Zhao, Y. (2026). Latent space-based network analysis for brain–behavior linking in neuroimaging. Nature Methods, 23(1), 225–235.

Tutorial: LatentSNA Tutorial

Documentation: Reference Manual (PDF)

Example Code & Simulated Data: R Code and Data Documentation

Video Tutorial: Code Demo

Method Overview: Paper Summary

GitHub

Visit the SWLab GitHub for additional software, code, tutorials, and research resources.