Hostname: page-component-77f85d65b8-g98kq Total loading time: 0 Render date: 2026-03-28T20:23:32.511Z Has data issue: false hasContentIssue false

Bayes Factor Tests for Group Differences in Ordinal and Binary Graphical Models

Published online by Cambridge University Press:  04 November 2025

Maarten Marsman*
Affiliation:
Universiteit van Amsterdam , Netherlands
Lourens Jan Waldorp
Affiliation:
Universiteit van Amsterdam , Netherlands
Nikola Sekulovski
Affiliation:
Universiteit van Amsterdam , Netherlands
Jonas Haslbeck
Affiliation:
Universiteit van Amsterdam , Netherlands Department of Clinical Psychological Science, Maastricht University, Netherlands
*
Corresponding author: Maarten Marsman; Email: m.marsman@uva.nl
Rights & Permissions [Opens in a new window]

Abstract

Multivariate analysis of psychological variables using graphical models has become a standard analysis in the psychometric literature. Most cross-sectional measures are either binary or ordinal, and the methodology for inferring the structure of networks of binary and ordinal variables is developing rapidly. In practice, however, research questions often focus on whether and how networks differ between observed groups. While Bayes factor methods for inferring network structure are well established, a similar methodology for assessing group differences in networks of binary or ordinal variables is currently lacking. In this article, we extend the Bayesian framework for the analysis of ordinal Markov random fields, a network model for binary and ordinal variables, and develop Bayes factor tests for assessing parameter differences in the networks of two independent groups. The proposed methods are implemented in the R package bgms, and we use numerical illustrations to show that the implemented methods work correctly and how well the methods work compared to existing methods in situations resembling empirical research.

Information

Type
Theory and Methods
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press on behalf of Psychometric Society
Figure 0

Figure 1 This illustrates how the pairwise interactions and their differences are modeled for the two groups.Note: The top panel shows the average size of the pairwise interactions, $\phi $, that would be obtained if grouping were ignored. The bottom two panels show the pairwise interactions for the two groups. Note that there is no group difference in the interaction between variables one and two ($\delta _{12} = 0$), and the group parameters are equal to the average, $\phi _{12}$. In contrast, the interaction between variables one and three switches sign and is here fully dictated by the difference effect, $\delta _{13}$. Finally, the interaction effect between variables two and three differs in size. Group A has a smaller interaction effect, and group B has a larger interaction effect.

Figure 1

Figure 2 Area under the ROC curve (AUC; y-axis) as a function of sample size per group (x-axis), for different numbers of variables (columns) and proportions of true group differences (rows).Note: The overall model has a density of $1$, corresponding to a fully connected network.

Figure 2

Figure 3 Area under the ROC curve (AUC; y-axis) as a function of sample size per group (x-axis), for different numbers of variables (columns) and proportions of true group differences (rows).Note: The overall model has a fixed network density of $0.15$.

Figure 3

Figure 4 Average runtime in minutes for the four compared methods (colors) as a function of sample size per group (x-axis) and number of variables (columns), averaged over all other simulation conditions.

Figure 4

Figure C1 Scatterplots of the posterior means estimated using the Hamiltonian Monte Carlo approach, as implemented in the R package rstan, against the posterior means estimated using the Metropolis-within-Gibbs approach, as implemented in the R package bgms.

Figure 5

Figure C2 The estimated prior inclusion probability of the threshold differences based on the outlined procedure is shown in the left panel, and the estimated prior density for one of the threshold difference parameters is shown in the right panel.

Figure 6

Figure C3 The estimated prior inclusion probability of the pairwise differences based on the outlined procedure is shown in the left panel, and the estimated prior density for one of the pairwise difference parameters is shown in the right panel.

Figure 7

Figure C4 Monte Carlo estimates of the expected Bayes factor $\text {BF}_{01}$ as a function of the number of synthetic data sets generated under $\mathcal {H}_1$.Note: Both the threshold and the pairwise difference Bayes factors tend to one. In addition, the first- and second-order moments are similar.

Figure 8

Table C1 Posterior means and standard deviations, and convergence diagnostics, from bgms and rstan output