{"id":4256,"date":"2024-03-11T11:39:45","date_gmt":"2024-03-11T10:39:45","guid":{"rendered":"https:\/\/advances.in\/psychology\/?p=4256"},"modified":"2026-03-16T16:47:08","modified_gmt":"2026-03-16T15:47:08","slug":"aip00010","status":"publish","type":"post","link":"https:\/\/advances.in\/psychology\/10.56296\/aip00010\/","title":{"rendered":"Simplifying Bayesian analysis of graphical models for the social sciences with easybgm: A user-friendly R-package"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Networks have become a popular tool to study phenomena in the medical fields, such as genetic and neurocognitive research (Bullmore &amp; Bassett, 2011; Lauritzen &amp; Sheehan, 2003) and have also appeared more widely in the social sciences (Newman et al., 2002). In psychology, adopting networks to study phenomena emerged as a new research field: <a href=\"https:\/\/advances.in\/psychology\/10.56296\/knowledge-hub\/advances-in-network-psychometrics\/\" data-type=\"knowledge_hub\" data-id=\"7665\">network psychometrics<\/a> (Borsboom et al., 2021). Here, networks are used to model psychological constructs as phenomena emerging through systems of interacting variables. Variables (e.g., symptoms of a disorder, or scores on an educational test) are represented by nodes, and the interactions between the variables are represented by edges. Graphical models are used to estimate those interactions, in particular, the conditional dependence structure of variables. Researchers mostly fit graphical models to cross-sectional data, where different model types are popular: <a href=\"https:\/\/advances.in\/psychology\/10.56296\/aip00013\/\" data-type=\"post\" data-id=\"4563\">the Ising model<\/a> for binary (Marsman et al., 2022) and ordinal (Marsman &amp; Haslbeck, 2023) data, and the <a href=\"https:\/\/advances.in\/psychology\/10.56296\/aip00022\/\" data-type=\"post\" data-id=\"5906\">Gaussian Graphical Model (GGM)<\/a> for continuous data (Lauritzen, 1996). Several Bayesian methods have been developed to infer the structure (i.e., the presence and absence of edges) and its parameters (i.e., the edge weights of present edges). By taking advantage of Bayesian methods, researchers can quantify the uncertainty about the estimated network model and its parameters, and provide evidence for the inclusion or exclusion of edges (Marsman &amp; Haslbeck, 2023; Marsman et al., 2019; Mohammadi et al., 2017; Williams &amp; Mulder, 2020a). These are great improvements over current frequentist methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Several established R packages can fit and visualize networks (R-Core-Team, 2024), e.g., <em>network<\/em> (Butts, 2008), <em>statnet<\/em> (Handcock et al., 2008), and <em>igraph<\/em> (Csardi &amp; Nepusz, 2006). In psychology, network psychometrics has its specific packages like <em>bootnet<\/em> to estimate networks and their stability (Epskamp et al.<a href=\"#_bookmark18\">,<\/a> 2018), <em>mgm<\/em> for mixed graphical models (Haslbeck &amp; Waldorp, 2015), <em>IsingFit<\/em> for Ising models (van Borkulo et al., 2015), and <em>qgraph<\/em> to visualize networks (Epskamp et al., 2012). These packages include a variety of widely used analysis tools, but they implement the frequentist analysis of networks. Other packages have emerged that allow for the Bayesian analysis of graphical models, in particular, <em>bgms<\/em> (Marsman &amp; Haslbeck, 2023), <em>BDgraph<\/em> (Mohammadi &amp; Wit, 2019), and <em>BGGM<\/em> Williams and Mulder (2020b). Unfortunately, these packages and their papers are mostly aimed at researchers with advanced statistical knowledge and programming experience. At present, the use of Bayesian network analysis is not accessible to applied researchers. To bring the benefits of Bayesian analysis of graphical models to all researchers, we present the user-friendly package <em>easybgm<\/em>. The package performs the Bayesian estimation of graphical models. It is specifically aimed at users with little experience of Bayesian inference or programming experience. <em>easybgm <\/em>consolidates the three existing packages for Bayesian graphical modeling in the social sciences (i.e., <em>bgms<\/em>, <em>BDgraph<\/em>, and <em>BGGM<\/em>) and combines their functionality to model all different data types.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The remainder of this paper is organized as follows. First, we introduce the methodological background of Bayesian graphical modeling. This also allows us to define the notation used throughout the paper; key terms are also defined in the glossary at the end of the paper. Readers new to the material can find a more extensive and accessible introduction to the <a href=\"https:\/\/advances.in\/psychology\/10.56296\/aip00016\/\" data-type=\"post\" data-id=\"5408\">Bayesian analysis of networks<\/a> in Huth et al. (2023). Next, we describe the workflow of the package. We introduce how the package obtains the model fit and give an overview of the different prior specifications. We discuss the output of the package and introduce the suite for visualizing the network results. The functionality of <em>easybgm <\/em>is demonstrated using a sample dataset on women and mathematics and with an additional example on a self-worth scale.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Methodological Background<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Graphical models are a subset of networks in which the network graph encodes probabilistic relationships between variables (i.e., links between nodes are not observed but must be estimated). In graphical models, the nodes are random variables and their pairwise relationships\u2013the edges\u2013are conditional dependencies (Lauritzen &amp; Wermuth, 1989). We focus here on undirected graphical models in which the edges do not imply a direction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In practice, we are interested in two aspects of the network: the underlying network structure \\(\\mathcal{S}\\) and the matrix of pairwise association strengths <strong>\u0398<\/strong>. First, the network structure \\(\\mathcal{S}\\)&nbsp;is a configuration of unweighted, undirected edges, where the presence of an edge indicates conditional dependence, and the absence of an edge indicates conditional independence. The number of possible structures grows exponentially as the number of variables increases. Since further inference is based on the structure estimate, it becomes critical to adequately quantify the uncertainty associated with the structure. Second, given a structure, we are interested in the strength and nature of the present edges which are encoded in <strong>\u0398<\/strong>, the matrix of edge weights. A positive value of <em>\u03b8<sub>ij <\/sub><\/em>indicates a positive association between the variables <em>i <\/em>and <em>j<\/em>, and negative values indicate a negative association of the variables. A higher absolute <em>\u03b8<sub>ij &nbsp;<\/sub><\/em>indicates a stronger association. The uncertainty of the partial association estimate is of interest, especially when drawing inferences about the strength of association and differences between network edges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Bayesian framework allows us to quantify the uncertainty of the network\u2019s structure and its parameters. To make use of the Bayesian approach we must first specify how likely certain parameter values and network structures are before we have seen the data. A Bayesian does this by specifying a prior distribution, a probability distribution that describes, for each value of the parameter, our belief that the respective value will produce the data (van de Schoot et al., 2015; Wagenmakers et al., 2018). In many cases, we have little expectation about the value of the parameter and <a href=\"https:\/\/advances.in\/psychology\/10.56296\/aip00016\/\" data-type=\"post\" data-id=\"5408\">specify a default, diffuse prior<\/a>. We discuss the (default) specification of prior distributions below. After observing the data, Bayes\u2019 rule is used to update the prior into a posterior distribution. The posterior is a probability distribution that describes, for each value of the parameter, our belief that the respective value produced the data we observed. This updated distribution contains everything we know about the structure of the network and its parameters, what we expected before seeing the data, and what we learned from the data. Formally, we can express this cycle of knowledge updating as<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">\\(\\begin{equation}\\label{Eq:Bayes1} \\underbrace{p(\\boldsymbol{\\Theta}\\text{, }\\mathcal{S} \\mid \\text{data})}_{\\text{joint posterior}} \\propto&nbsp;\\underbrace{p(\\text{data} \\mid \\boldsymbol{\\Theta} \\text{, }\\mathcal{S})}_{\\text{likelihood}} &nbsp;\\times &nbsp;\\underbrace{p(\\boldsymbol{\\Theta}\\mid\\mathcal{S})}_{\\substack{\\text{prior on the} \\\\ \\text{parameters}}} &nbsp;\\times &nbsp;\\underbrace{p(\\mathcal{S}).}_{\\substack{\\text{prior on the} \\\\ \\text{graph structure}}} \\end{equation}\\tag{1}\\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The posterior distribution can be used to describe our network and the uncertainty associated with its estimation.<a href=\"#_ftn1\" data-type=\"internal\" data-id=\"#_ftn1\">[1]<\/a> Next, we elaborate on how to quantify the uncertainty of the structure (i.e., how likely are edges to be included in the network) and the parameter estimates (i.e., how certain are the edge weights).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Structure Uncertainty &#8211; Edge Presence or Absence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In network psychometrics, we are oftentimes primarily interested in the structure of the network, i.e., which edges are present and which are absent. For example, to assess the link between node <em>i <\/em>and <em>j<\/em>, we are interested in the two hypotheses<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\\(\\mathcal{H}^{(ij)}_1\\): There is an edge between the variables \\(i\\) and \\(j\\);<\/li>\n\n\n\n<li>\\(\\mathcal{H}^{(ij)}_0\\): There is no edge between the variables \\(i\\) and \\(j\\).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We can use the posterior distribution of the structures (i.e., \\(p(\\mathcal{S} \\mid \\text{data})\\)) to determine how likely both hypotheses are. As such, we obtain the posterior probability for edge inclusion and exclusion. To obtain the posterior probability of edge presence between node \\(i\\) and \\(j\\) (i.e., \\(\\mathcal{H}^{(ij)}_1\\)), we sum the posterior probabilities of all structures \\(\\mathcal{S}^\\prime\\) that include the edge between the variables<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">\\(p(\\mathcal{H}^{(ij)}_1 \\mid \\text{data}) = \\sum_{\\mathcal{S}^\\prime \\in \\mathcal{S}^{(i-j)}} p(\\mathcal{S}^\\prime \\mid \\text{data})\\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and for H<sub>0<\/sub><sup>(<em>ij<\/em>)<\/sup> that there is no edge between the two variables by summing over all structures where the edge is absent. This technique is known as Bayesian model-averaging (BMA; e.g., Hinne et al., 2020; Hoeting et al., 1999). In BMA, each possible graph structure is treated as a separate statistical model and we aggregate over all possible models rather than choosing a single most likely one. Two of the three packages implemented in <em>easybgm<\/em> use BMA (Marsman et al., 2023; Mohammadi &amp; Wit, 2015). Since BMA can be computationally and analytically challenging, some approaches use the posterior distribution of a single structure (e.g., <em>BGGM<\/em>; Williams &amp; Mulder, 2020b). Here, Equation (1) reduces \\(\\mathcal{S}_s\\) and and <strong>\u0398<em><sub>s<\/sub><\/em><\/strong><em> <\/em>for one particular structure <em>s<\/em>.<a href=\"#_ftn1\">[2]<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the posterior edge inclusion probabilities at hand, we can test the two hypotheses against each other. In the Bayesian framework, the hypothesis testing tool is the Bayes Factor (Kass &amp; Raftery, 1995; Wagenmakers et al., 2016). A Bayes factor is a measure used to compare how well two competing models or hypotheses explain the observed data, indicating which explanation is more strongly supported by the data. Concerning networks, the Bayes factor is used to compare the evidence for edge presence against the evidence for edge absence. The Bayes factor can be obtained in the following way<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">\\(\\begin{equation}\\label{BF} \\text{BF}_{10} = \\underbrace{\\frac{p(\\mathcal{H}^{(ij)}_1\\mid \\text{data})}{p(\\mathcal{H}^{(ij)}_0 \\mid \\text{data})}}_{\\substack{\\text{posterior}\\\\\\text{inclusion odds}}} \\bigg\/ \\underbrace{\\frac{p(\\mathcal{H}^{(ij)}_1)}{p(\\mathcal{H}^{(ij)}_0)}}_{\\substack{\\text{prior}\\\\\\text{inclusion odds}}}. \\end{equation}\\tag{2}\\)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We call this the inclusion Bayes factor (Huth et al., 2023; Marsman &amp; Haslbeck, 2023; Marsman et al., 2022; Sekulovski, Keetelaar, Huth, Wagenmakers et al., 2023), which is interpreted as the strength of evidence in the data for edge inclusion (i.e., conditional dependence). Conversely, we can take the inverse, \\(\\text{BF}_{01}= 1\/\\text{BF}_{10}\\), to quantify the evidence for edge exclusion (i.e., conditional independence). For example, a \\(\\text{BF}_{10} = 5\\) would mean that the data are 5 times more likely under a network structure that includes the edge between variables \\(i\\) and \\(j\\) than under a network structure that excludes that edge. Bayes factors greater than \\(1\\) indicate some evidence for edge inclusion; a \\(BF_{10} &gt; 3\\) indicates weak and a \\(BF_{10} &gt; 10\\) indicates strong evidence for edge inclusion (Jeffreys, 1961). Conversely, a \\(BF_{10} &lt; 1\\) indicates evidence for edge exclusion, where a \\(BF_{10} &lt; \\frac{1}{3}\\)&nbsp;denotes weak and a \\(BF_{10} &lt; \\frac{1}{10}\\) strong evidence for edge exclusion (Kass &amp; Raftery, 1995). We suggest to consider a \\(\\text{BF}_{10} \\geq 10\\) as evidence for edge inclusion and conversely a \\(\\text{BF}_{10} \\leq \\frac{1}{10}\\)&nbsp;as evidence for edge exclusion (e.g., Huth et al., 2023). All \\(\\text{BF}_{10}\\)<sub> <\/sub>in between are considered inconclusive edges. Researchers may choose their cutoffs, depending on the substantive research question.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Parameter Uncertainty<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To quantify parameter uncertainty, we can use the posterior distribution of the partial association parameters \\(p(\\boldsymbol{\\Theta} \\mid \\mathcal{S}\\text{, }\\text{data})\\) and obtain posterior standard deviations and credible intervals for each partial association parameter <em>\u03b8<sub>ij<\/sub><\/em>. The credible interval is the Bayesian equivalent of the frequentist confidence interval and is a range of values within which <em>\u03b8<sub>ij<\/sub><\/em> is believed to lie with <em>x<\/em>% probability, i.e., covers <em>x<\/em>% of the posterior distribution. A special type of credible interval, the highest posterior density interval, is the shortest interval that covers <em>x<\/em>% of the posterior distribution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 1<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Workflowof the easybgm Package<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbb522&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbb522\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2420\" height=\"1661\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3.webp\" alt=\"Flowchart illustrating the easybgm R package workflow: 1) Data Input (supports continuous, binary, ordinal, and mixed data), 2) Analysis (fits model using bgms, BDgraph, or BGGM), 3) Extraction of Results (edge evidence, structure uncertainty, parameters), and 4) Visualization (network plots, evidence plots).\" class=\"wp-image-4368\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3.webp 2420w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-300x206.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-1024x703.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-768x527.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-1536x1054.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-2048x1406.webp 2048w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-380x261.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-550x378.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-800x549.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-1160x796.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-760x522.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-1100x755.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-1600x1098.webp 1600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-2320x1592.webp 2320w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure1-3-600x412.webp 600w\" sizes=\"(max-width: 2420px) 100vw, 2420px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">easybgm<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Overview of the Package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>easybgm <\/em>was developed to make the Bayesian analysis of cross-sectional networks in R more accessible and user-friendly. The package comprises three steps which are illustrated in Figure 1. First, it fits a Bayesian graphical model to cross-sectional data using one of the three existing R packages <em>BGGM <\/em>(Williams &amp; Mulder, 2020b), <em>bgms <\/em>(Marsman et al., 2019), and <em>BDgraph <\/em>(Mohammadi &amp; Wit, 2019). Second, <em>easybgm <\/em>extracts the relevant results from the respective package fits and transforms them into usable output (i.e., including the edge inclusion Bayes factor, parameter estimates, and posterior structure probabilities). Third, an extensive set of custom plots can be used to evaluate the network results. These plots visualize, among other things, the structure uncertainty, the evidence for edge inclusion and exclusion, and the edge weights and their corresponding uncertainty (i.e., credible intervals). Thus, <em>easybgm <\/em>provides users with features that facilitate the estimation and interpretation of network results, without restricting users with standard features.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the following, we illustrate the characteristics of the package with a dataset on the attitudes of high school students toward mathematics in 1979 (Fowlkes et al., 1988).<a href=\"#_ftn1\">[3]<\/a>&nbsp; At that time, female high school students were enrolled in fewer mathematics courses than males. The Women and Mathematics (WAM) Secondary School Lectureship Program was designed to reduce this gap and increase female interest in mathematics by providing positive female role models teaching mathematics. To evaluate the WAM program, Fowlkes et al. (1988) conducted a survey to assess the female students\u2019 attitudes toward mathematics achievement. Students were asked to respond to the statement &#8220;I will be needing Mathematics in my future work&#8221; along with related topics. The dataset contains 1<em>,<\/em>190 observations measured on six binary variables: response to the above statement (i.e., <em>agree<\/em> vs. <em>disagree<\/em>), WAM lecture attendance (i.e., <em>yes<\/em> vs. <em>no<\/em>), gender (i.e., <em>male<\/em> vs. <em>female<\/em>), school type (i.e., <em>urban<\/em> vs. <em>rural<\/em>), subject preference (i.e., <em>mathematics\/science<\/em> vs. <em>liberal arts<\/em>), and future plans (i.e., <em>college<\/em> vs. <em>work<\/em>). As a first step, we load <em>easybgm <\/em>and the dataset that comes with the <em>BGGM <\/em>package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>library (easybgm)\nlibrary (BGGM)\ndata (\"women_ math\")<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Estimation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The main function of <em>easybgm <\/em>is called easybgm and has two mandatory input arguments: <em>data<\/em> and <em>type<\/em>. <em>data<\/em> is a <em>n<\/em> \u00d7 <em>p<\/em> data frame or matrix that encodes the numeric responses of <em>n<\/em> individuals to <em>p<\/em> variables at one point in time, which can be a cross-sectional study or a single timepoint in a panel study. With <em>type<\/em>, the user specifies the type of variables in the data and thus the model to be estimated. <em>Type<\/em> can be one of the following arguments: \u201ccontinuous\u201d, \u201cbinary\u201d, \u201cordinal\u201d, and \u201cmixed\u201d. Users can specify \u201ccontinuous\u201d to estimate a Gaussian graphical model (GGM), a network model for multi-variate normal data. \u201cbinary\u201d is used to estimate an Ising model (Ising, 1925). Specifying \u201cordinal\u201d initiates the estimation of an ordinal MRF (Marsman &amp; Haslbeck, 2023), which can consist of variables with a varying number of categories (i.e., also a combination of binary and ordinal variables). Finally, users can specify \u201cmixed\u201d to estimate a combination of continuous, ordinal, and binary data. With the specification of \u201cmixed\u201d comes an additional mandatory argument <em>not_cont<\/em>, which is a vector of length <em>p<\/em> that encodes whether the variables are continuous (i.e., 1 indicates not continuous and 0 indicates continuous). The \u201cmixed\u201d type estimates a Gaussian copula graphical model (Dobra &amp; Lenkoski, 2011), which transforms non-continuous data into a continuous latent variable and estimates a GGM based on the latent variable. Users should avoid the \u201cmixed\u201d specification if they include variables with more than two categories that are unordered (e.g., ethnicity or religion). The model will transform these variables into an ordered continuous variable even though there is no true order underlying the variables (Mohammadi et al., 2017).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With these two mandatory arguments, <em>easybgm <\/em>can start the estimation. By default, <em>easybgm <\/em>uses <em>BDgraph<\/em> to fit continuous and mixed data and <em>bgms <\/em>to fit ordinal and binary data. For our example, we specify the data and the binary type, which will prompt the model fitting with <em>bgms<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fit =  easybgm(data  =  women_ math , type  =  \"binary\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In addition to the mandatory arguments, users can specify a number of other optional arguments. Users can deviate from the default package by specifying the preferred R package with the <em>package<\/em> argument. For now, <em>easybgm <\/em>allows users to specify one of the three major R packages for fitting: <em>BGGM<\/em>, <em>BDgraph<\/em>, and <em>bgms<\/em>. The optional argument <em>save<\/em> encodes whether to save the posterior samples of the <strong>\u0398<\/strong> parameter estimates and is set to \u201cFALSE\u201d by default. Posterior samples are necessary to assess the stability of the parameter estimates and to obtain credible intervals around the centrality measure. Strength centrality can be obtained by setting the <em>centrality<\/em> argument to \u201cTRUE\u201d. This will initiate the estimation of the network centrality for each iteration of the sampler. The centrality argument is \u201cFALSE\u201d by default. Additionally, users can specify the number of iterations the sampler should perform with <em>iter<\/em>. For illustrative purposes, 10<em>,<\/em>000 iterations are sufficient, but to minimize sampling fluctuations at least 100<em>,<\/em>000 samples are recommended. Finally, users can pass additional arguments to <em>easybgm <\/em>that are used in the fitting package functions, such as informed prior specifications and sampling options. Specifying informed prior arguments requires more attention and therefore we provide a detailed overview in the next section. Specification of the sampling options includes the burnin period (i.e., the number of discarded samples of the initial iterations; in <em>bgms <\/em>and <em>BDgraph<\/em> the argument <em>burnin<\/em>) and specifically for <em>BDgraph <\/em>the type of sampler (i.e., the <em>algorithm<\/em> argument which can be either RJMCMC and BDMCMC Mohammadi &amp; Wit, 2019). For an overview of all possible additional arguments, users can refer to the help file of the underlying packages with <em>?bdgraph<\/em>, <em>?bgm<\/em>, and <em>?explore<\/em> for <em>BGGM<\/em>. Considering all mandatory and optional arguments, the full specification of <em>easybgm <\/em>is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fit = easybgm(data       = women_math,\n              type       = \"binary\",\n              package    = \"bgms\",\n              iter       = 1e4,\n              save       = TRUE,\n              centrality = TRUE )\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Prior Distributions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>easybgm<strong> <\/strong><\/em>allows users to specify the prior distributions of the structure and parameters of the network model as optional arguments during fitting. For each of the three underlying packages, the prior distributions and thus the function arguments are different. The priors can be divided into two groups: priors on the structures or edge inclusion probabilities and priors on the parameters. Both will be discussed in more detail below. For an overview of the different prior argument options per package and type of prior, see Table 1.<a href=\"#_ftn1\">[4]<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Table 1<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>The Different Options for Specifying a Prior<\/em><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>&nbsp;<\/td><td><em>BDgraph<\/em><\/td><td><em>bgms<\/em><\/td><td><em>BGGM<\/em><\/td><\/tr><tr><td>Structure Prior<\/td><td>g.prior<\/td><td>edge_prior <br>inclusion_prob <br>beta_bernoulli_alpha <br>beta_bernoulli_beta<\/td><td>&nbsp;<\/td><\/tr><tr><td>Parameter Prior<\/td><td>df.prior<\/td><td>interaction_scale <br>threshold_alpha <br>threshold_beta<\/td><td>prior_sd<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prior Distribution for the Network Structure<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Different structures may have different densities or numbers of edges present, and the structure prior reflects the researcher\u2019s beliefs about which structure is more plausible or appropriate before observing any data. For example, researchers may want to specify the structure prior if they believe that a denser structure is more likely than a sparser structure (e.g., all nodes measure a single construct). In some cases, the structure prior argument can also be used to specify the prior inclusion probability for a particular edge. For example, if previous research has consistently shown the presence of the edge between two nodes, one could specify a higher probability for the inclusion of that particular edge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <em>BDgraph<\/em>, the argument for the structure prior is <em>g.prior<\/em>. The argument defines the prior probability of edge inclusion, and can be either a single value between 0 and 1, or a matrix of edge-specific probabilities between 0 and 1. A value of 0 corresponds to exclusion and 1 corresponds to inclusion. The default is 0<em>.<\/em>5, which means that each edge has the same prior probability of being excluded and included. A higher value assigns more probability mass to denser structures (i.e., more present edges), and a lower value assigns more probability mass to sparser structures (i.e., fewer present edges).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>bgms <\/em>specifies the structure prior with the argument <em>edge_prior<\/em>. This argument defines the type of the prior on the edges. This can be either \u201cBernoulli\u201d, which is the default option, or \u201cBeta-Bernoulli\u201d. The Bernoulli distribution allows the edge inclusion probabilities to be specified directly, using the argument <em>inclusion_prob<\/em>. The latter argument is the equivalent of <em>g.prior<\/em> in <em>BDgraph<\/em>, and can also be either a single value or a matrix with edge-specific values. The default is 0<em>.<\/em>5, which gives each edge an equal prior probability of being included or excluded. If the structure prior is \u201cBeta-Bernoulli\u201d, the prior probability of edge inclusion follows a Beta distribution, whose parameters can be specified as <em>beta_bernoulli_alpha<\/em> and <em>beta_bernoulli_beta<\/em> (for details see Sekulovski, Keetelaar, Haslbeck, &amp; Marsman, 2023). The default is 1 for both. If they are equal, graphs with the same number of edges are given the same prior probability. If <em>beta_bernoulli_alpha<\/em> is greater than <em>beta_bernoulli_beta<\/em>, more probability mass is assigned to the inclusion of edges, i.e., denser networks, and vice versa. The package <em>BGGM <\/em>has no options to specify the structure prior.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prior Distribution for the Network Parameters<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The parameter prior represents the prior beliefs about the edge weights within a chosen structure (i.e., \\(p(\\mathbf{\\Theta} \\mid \\mathcal{S})\\)). For example, researchers could specify their prior to reflect their belief that edge weights are small and close to zero or that they tend to be large and farther from zero. It could also be used to specify that edge weights are assumed to be positive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>BDgraph <\/em>uses the G-Wishart distribution for the prior of the edge weights (Mohammadi et al., 2017; Roverato, 2002). The argument <em>df.prior<\/em> can be used to specify the degrees of freedom of the G-Wishart distribution, which is the prior distribution of the inverse covariance matrix of the model. The default value of the degrees of freedom is set to three in <em>BDgraph<\/em>, and its value must be greater than two. Lower degrees of freedom spread out the distribution, making larger edge weights more plausible. Smaller degrees of freedom, on the other hand, make the prior distribution more peaked around zero, making larger edge weight values less plausible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>bgms <\/em>package specifies a Cauchy distribution as the prior distributions of the model parameters (Marsman &amp; Haslbeck, 2023). The scale parameter of the prior distribution can be specified by <em>interaction_scale<\/em>, which defaults to 2.5. The threshold parameters follow a transformed beta-prime prior distribution. The parameters of the beta-prime distribution can be specified as <em>threshold_alpha<\/em> and <em>threshold_beta<\/em>. The default for both is 0<em>.<\/em>5. If they are equal, the distribution is symmetric around zero. Smaller values give a more diffuse, less informative prior. If alpha is greater than beta, the distribution is skewed to the left and vice versa.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>BGGM<strong> <\/strong><\/em>has only one option to specify the prior distribution with the argument <em>prior_sd<\/em>. This is the standard deviation of the matrix-F prior distribution (Mulder &amp; Pericchi, 2018), the prior distribution on the covariance matrix of the model. It is roughly the scale of a beta distribution. Larger values assign more mass to parameter values away from zero. The default value is 0<em>.<\/em>25.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our package <em>easybgm <\/em>contains default settings for all prior distributions for each of the packages. We encourage users who are new to Bayesian estimation to stick to the default settings. If specifying informed prior distributions, robustness checks are encouraged to assess the stability of the results. An example prior robustness check is illustrated below in Figure 7.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Output of <em>easybgm<\/em><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The function easybgm returns a list that contains the result of the estimation process, which can be used for several purposes. First, researchers may want to test whether a particular edge should be included or excluded. Two sources of information are important for this: the posterior inclusion probability (PIP) contained in the list element <em>inc_probs<\/em>, and the inclusion Bayes factor contained in <em>inc_BF<\/em>. The PIP is a p \u00d7 p matrix with entries in the interval [0, 1]. Values greater than 0.5 indicate some support for the inclusion of an edge. The closer the PIP is to 1, the more confident one can be about including an edge; the closer the PIP is to 0, the more confident one can be about excluding an edge. The PIP is based on a model-averaged estimate when fitting the graphical model with <em>BDgraph <\/em>or <em>bgms<\/em>, while it is a single-structure estimate for graphical models estimated with <em>BGGM<\/em>. More importantly, the PIP can be transformed into the Bayesian hypothesis testing tool, the Bayes factor. Users can obtain the inclusion Bayes factors <em>inc_BF<\/em> as shown in Equation (1) for fits using <em>BDgraph <\/em>and <em>bgms<\/em>. An inclusion Bayes factor <em>BF<\/em><sub>10<\/sub> &gt; 1 indicates evidence of inclusion, while a <em>BF<\/em><sub>10<\/sub> &gt; 10 indicates strong evidence for inclusion. Conversely, a <em>BF<\/em><sub>10<\/sub> &lt; 1 indicates evidence of exclusion and <em>BF<\/em><sub>10<\/sub> &lt; \\(\\frac{1}{10}\\) indicates strong evidence for exclusion (i.e., conditional independence). According to the median probability model, we consider all edges with a PIP greater than 0.5 to be included in the network (Barbieri &amp; Berger, 2004; Barbieri et al., 2020). This binary edge inclusion indicator is stored in the list element <em>structure<\/em> and thus indicates the network structure of all edges with some evidence for inclusion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Second, researchers may wish to learn about the strength and sign (i.e., positive or negative) of an edge weight. This information is contained in the object <em>parameters<\/em>, a <em>p <\/em>\u00d7 <em>p <\/em>matrix where the off-diagonal entries encode the strength of the partial association parameters <strong>\u0398<\/strong>. Depending on the estimated model (e.g., GGM, Ising model, or ordinal MRF), the matrix is interpreted differently. For GGM, the edge weights correspond to partial correlations that can take values in the interval [\u22121<em>, <\/em>1]. In contrast, for the Ising and ordinal MRF models, the edge weights are partial associations, which closely resemble log odds ratios, and their range is in the interval [\u2212\u221e<em>, <\/em>\u221e]. The higher the absolute value of the parameter, the stronger the association between two variables, after controlling for the influence of all other parameters. Positive edge weights indicate a positive association\u2013a higher value on one variable tends to result in a higher value on the other variable. Negative edge weights indicate a negative association\u2013a higher value on one variable corresponds to a lower value on the other variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While most network analysis packages estimate a single network structure on which they base their parameter estimation, packages such as <em>BDgraph <\/em>and <em>bgms<\/em> simulate the underlying structure from its posterior distribution and can use these samples to determine the uncertainty associated with the estimated structure. The vector <em>structure_probabilities<\/em> contains the posterior probabilities of all simulated structures. These posterior probabilities are in the interval [0<em>, <\/em>1], with higher values indicating a higher posterior probability, and sum to one. If the posterior probability of a structure is close to one, we can be relatively certain that this structure generated or best predicts the data at hand. In addition, the output contains the weights of a particular structure (i.e., <em>graph_weights<\/em>), which is a vector of the length of the number of simulated structures, detailing the absolute number of times a particular structure has been simulated; thus, <em>structure_probabilities<\/em> \u00d7 iter. Finally, the output element <em>sample_graphs<\/em> encodes the actual composition of the simulated structures (i.e., which edges are in the simulated structure and which are not). <em>sample_graphs<\/em> is a vector whose entries are a character of length <em>k <\/em>(i.e., the number of parameters in the model <em>k <\/em>= <em>p<\/em>(<em>p<\/em>\u22121)\/2), where each character element represents an edge, which is either 0 (excluded) or 1 (included). These structure objects can be used to determine which structures have been simulated and how often they have been simulated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the user has specified <em>save<\/em> as \u201cTRUE\u201d, the package will extract the posterior samples of the parameter estimates, which is an <em>iter <\/em>\u00d7 <em>k <\/em>matrix. Each column represents an edge between two nodes in the network, and each row is the corresponding sample of the edge for that iteration of the sampler. If the user has extracted the strength centrality (i.e., set <em>centrality<\/em> = TRUE), <em>fit<\/em> will also contain an <em>iter <\/em>\u00d7 <em>p <\/em>matrix with the posterior samples of the strength centrality. Each column represents the posterior strength centrality estimates for a variable, and each row represents the centrality estimate in the particular iteration of the sampler. Higher strength centrality estimates indicate that a variable is strongly connected in the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get a quick overview of the output, <em>easybgm<\/em> works with S3 classes using the <em>summary()<\/em> function. The summary output consists of four parts (see the output for the example below). The first part lists the package used, the number of variables, and the data type. The second part is a matrix of edge-specific information. Each edge is listed in a row. This row contains the posterior parameter estimate, the posterior inclusion probability, the inclusion Bayes factor, and the categorization of the edge. The category encodes whether an edge is included, excluded, or inconclusive based on the inclusion Bayes factor. Users can set the threshold for the Bayes factor classification with <em>evidence_thresh<\/em>. By default, the threshold is set to 10. If the inclusion Bayes factor is larger than 10, the edge is classified as included, and if the inclusion Bayes factor is smaller than \\(\\frac{1}{10}\\), the edge is classified as excluded. For Bayes factors between these thresholds, the classification is inconclusive. The third part of the summary output provides aggregated edge information. It lists the number of included, excluded, and inconclusive edges in the network, as well as the number of possible edges. This gives the user a quick overview of the stability and density of the network. The higher the number of conclusive edges (i.e., classified as either included or excluded), the more stable the network. Conversely, if the network has a high percentage of inconclusive edges, edge presence and absence are uncertain. Researchers should refrain from making strong inferential conclusions. The final output section is a description of the structure uncertainty. It shows the number of structures visited, the number of possible structures (i.e., 2<em><sup>k<\/sup><\/em>), and the highest posterior structure probability. This last section can only be obtained for networks fitted with <em>BDgraph <\/em>and <em>bgms<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>summary(fit, evidence_tresh = 10)\n---------------------------------------------------------------------------------\nBAYESIAN ANALYSIS OF NETWORKS\nModel type : binary\nNumber of nodes : 6\nFitting Package : bgms\n---\nEDGE SPECIFIC OVERVIEW\nRelation   Estimate Posterior Incl.Prob.  Inclusion BF     Category\nLCA - GND   0.000         0.035              0.036         excluded\nLCA - SCT   0.001         0.035              0.036         excluded\nGND - SCT   0.003         0.037              0.039         excluded\nLCA - NMF   0.002         0.041              0.042         excluded\nGND - NMF   0.512         1.000              Inf           included\nSCT - NMF  -0.011         0.084              0.092         excluded\nLCA - SBP   0.001         0.034              0.035         excluded\nGND - SBP  -0.758         1.000              Inf           included\nSCT - SBP   0.340         0.977              41.735        included\nNMF - SBP  -0.977         1.000              Inf           included\nLCA - FTP  -0.002         0.042              0.043         excluded\nGND - FTP   0.001         0.037              0.039         excluded\nSCT - FTP   1.181         1.000              Inf           included\nNMF - FTP   0.682         1.000              Inf           included\nSBP - FTP  -0.020         0.107              0.120         inconclusive\n\nBayes Factors larger than 10 were considered sufficient evidence for the classification.\n---\nAGGREGATED EDGE OVERVIEW\nNumber of edges with sufficient evidence for inclusion : 6\nNumber of edges with insufficient evidence : 1\nNumber of edges with sufficient evidence for exclusion : 8\nNumber of possible edges : 15\n\n---\nSTRUCTURE OVERVIEW\nNumber of visited structures : 114\nNumber of possible structures : 32768\nPosterior probability of most likely structure : 0.6139\n ---<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Visualization<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Edge Evidence Plot<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The first step is to test whether there is evidence that an edge is present or absent in the underlying network structure, or whether there is insufficient evidence for either conclusion. This information is contained in the posterior inclusion probability or the Bayes factor and can be visualized with the edge evidence plot. The edge evidence plot colors the edges according to the results of the hypothesis tests: blue for evidence of inclusion, red for evidence of exclusion, and gray for an absence of evidence. The plot can be obtained with the <em>plot_edgeevidence<\/em> function. The only mandatory argument is <em>output<\/em>, which is the fit obtained with <em>easybgm <\/em>function. There are several optional arguments. <em>evidence_thres<\/em> is the cutoff of the Bayes factor that is used to categorize the evidence as inclusion, exclusion, or inconclusive. If an edge\u2019s Bayes factor is greater than this threshold, it is included, and it is excluded if it is less than the inverse of this threshold. Anything in between is considered inconclusive. The default threshold value is ten. As the number of nodes increases, the graph becomes harder to read and interpret. For this reason, the user can choose to display only a subset of the edges. The <em>split <\/em>argument splits the plot into two plots at inclusion Bayes factors of 1, creating one plot with edges with evidence for inclusion and one with edges with evidence for exclusion. The default is \u201cFALSE\u201d. The <em>show<\/em> argument, on the other hand, specifies which edges to show, which can be the set of included, excluded, or inconclusive edges, or a combination of these. All edges are shown if the user specifies \u201call\u201d, which is the default. To improve the layout of the plot, the user can add any additional arguments that are also known to the <em>qgraph <\/em>package, such as adding labels, increasing node size, and changing node colors. The edge evidence plot is shown in Figure 2a and can be obtained with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_edgeevidence( fit , evidence_ thres =  10 , split  =  FALSE , show  =  \" all \")<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Network Plot<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The edge weights of present edges can be visualized with the network plot. The plot is generated with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_network(fit , exc_prob = 0.5 , dashed = FALSE )<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and uses the output of easybgm as the input. The user can specify which edges to display. By default, easybgmdisplays the median probability plot (Barbieri et al., 2020), which excludes all edges with a posterior inclusion probability less than 0<em>.<\/em>5. Depending on the substantive research question, the user can change the threshold for excluded edges with the argument <em>exc_prob<\/em>. The current network plot does not distinguish between edges with sufficient evidence for inclusion and edges with <em>in<\/em>sufficient evidence for inclusion. To indicate edges with insufficient evidence, the user can change the line type with the <em>dashed<\/em> argument. When set to \u201cTRUE\u201d, edges with insufficient evidence are shown with a dashed line. The default is \u201cFALSE\u201d. Edges with an inclusion Bayes factor smaller than ten are considered inconclusive and shown with a dashed line. However, users can override the default evidence threshold with the <em>evidence_thresh<\/em> argument. Again, the user can add any arguments of <em>qgraph <\/em>to the function to improve the layout. For the women and mathematics data, the network plot is shown in Figure 2b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 2<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Edge Evidence Plot (a) and Network Plot (b). Edge evidence plot showing the evidence for inclusion or exclusion. In this graph, the blue edges represent edges with posterior evidence for presence, the red edges evidence for absence, and the gray edges have insufficient evidence to conclude either way (a). Network plot in which the edges represent edge weights of the present edges. The thickness of the edges corresponds to the value of the edge weights, and the colors represent positive (blue) and negative (red) relations (b).<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbc316&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbc316\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"453\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1024x453.webp\" alt=\"Edge Evidence Plot (a) and Network Plot (b). Edge evidence plot showing the evidence for inclusion or exclusion. In this graph, the blue edges represent edges with posterior evidence for presence, the red edges evidence for absence, and the gray edges have insufficient evidence to conclude either way (a). Network plot in which the edges represent edge weights of the present edges. The thickness of the edges corresponds to the value of the edge weights, and the colors represent positive (blue) and negative (red) relations (b).\" class=\"wp-image-4369\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1024x453.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-300x133.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-768x340.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1536x680.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-2048x906.webp 2048w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-380x168.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-550x243.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-800x354.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1160x513.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-760x336.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1100x487.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-1600x708.webp 1600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-2320x1027.webp 2320w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-600x265.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure2-3-scaled.webp 2560w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Highest Density Intervals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Next, researchers might be interested in the uncertainty associated with our estimated edge weights. This information is contained in the highest density interval of the edge weight posterior. It can be visualized with the parameter highest density plot. The plot shows the posterior estimates of the edge weights and their 95% highest density intervals. It is invoked by<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_parameterHDI(fit)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The function takes only one argument, the output object, which is the easybgm fit. The user can add additional arguments to the underlying <em>ggplot2 <\/em>function. For the women and mathematics data, the posterior highest density plot is shown in Figure 3. The x-axis indicates the strength of the edge weight. The y-axis indicates the edge between nodes <em>i <\/em>and <em>j<\/em>. The farther the posterior estimates (i.e., the points in the plot) are from zero, the stronger the corresponding edge weights. The wider the highest density intervals (i.e., the error bars around the points), the less certain we are about the specific value of the edge weight.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 3<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Highest Density Interval Plot. The plot shows the highest density intervals of the estimated parameters corresponding to the relationships between the variables of the women and mathematics data.<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbc7c7&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbc7c7\" class=\"wp-block-image size-full wp-lightbox-container\"><img decoding=\"async\" width=\"1381\" height=\"1359\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2.webp\" alt=\"Highest Density Interval Plot. The plot shows the highest density intervals of the estimated parameters corresponding to the relationships between the variables of the women and mathematics data.\" class=\"wp-image-4371\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2.webp 1381w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-300x295.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-1024x1008.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-768x756.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-80x80.webp 80w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-380x374.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-550x541.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-800x787.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-1160x1142.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-760x748.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-1100x1082.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure3-2-600x590.webp 600w\" sizes=\"(max-width: 1381px) 100vw, 1381px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Structure Plots<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">There are three different plots included in <em>easybgm <\/em>that allow the user to visualize the structure and its uncertainty. The first one plots the posterior structure probabilities of all simulated structures. This again uses output of the easybgm function. Instead of showing the posterior structure probability, the plot can also show the Bayes factor of the most likely structure versus all other simulated structures. Users can switch to the Bayes factor by setting <em>as_BF<\/em> to \u201cTRUE\u201d. The posterior structure plot can be called with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_structure_ probabilities(fit, as_BF = FALSE )<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and is shown in Figure 4a.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The second structure plot, the posterior complexity plot, shows the posterior distribution of the structure\u2019s complexity (i.e., the number of present edges). Again, only the <em>output<\/em> of the easybgm function is required. Additionally, the user can specify arguments of the underlying ggplot2package.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_complexity_probabilities (fit)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 4<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Structure Uncertainty Plots. The posterior structure plot shows the distribution of the posterior structure probabilities of all simulated structures in the women and mathematics data (a). The posterior complexity graph shows the posterior probability distribution over the graph complexity, i.e., the number of present edges (b).<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbccdf&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbccdf\" class=\"wp-block-image size-large is-resized wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"548\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1024x548.webp\" alt=\"Structure Uncertainty Plots. The posterior structure plot shows the distribution of the posterior structure probabilities of all simulated structures in the women and mathematics data (a). The posterior complexity graph shows the posterior probability distribution over the graph complexity, i.e., the number of present edges (b).\" class=\"wp-image-4372\" style=\"width:701px;height:auto\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1024x548.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-300x161.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-768x411.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1536x822.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-2048x1096.webp 2048w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-380x203.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-550x294.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-800x428.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1160x621.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-760x407.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1100x589.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-1600x856.webp 1600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-2320x1242.webp 2320w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1-600x321.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure4-1.webp 2485w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The third structure plot shows the resulting graph structure; a network showing all edges that have some evidence of inclusion (i.e., inclusion Bayes factor greater than 1). The plot is generated with<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_structure(fit)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It requires the <em>output<\/em> of the easybgm function. The user can specify additional <em>qgraph<\/em> arguments. An example is shown in Figure 5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 5<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Structure Plot. The structure plot shows the resulting estimated structure for the women and mathematics data. Each link represents edges with a posterior inclusion probability larger than 0.5.<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbd134&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbd134\" class=\"wp-block-image size-large is-resized wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"687\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-1024x687.webp\" alt=\"Structure Plot. The structure plot shows the resulting estimated structure for the women and mathematics data. Each link represents edges with a posterior inclusion probability larger than 0.5.\" class=\"wp-image-4367\" style=\"width:700px;height:auto\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-1024x687.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-300x201.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-768x515.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-1536x1031.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-380x255.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-550x369.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-800x537.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-1160x778.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-760x510.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-1100x738.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5-600x403.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure5.webp 1538w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Centrality Plot<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To summarize the network, centrality measures have been proposed to aggregate the results per node. One particular centrality measure is the strength centrality, which indicates the degree to which a node is connected to other nodes in a network. The centrality estimate can be obtained for each sample (i.e., iteration) of the posterior parameter distribution. As such, the uncertainty of the centrality estimates can be quantified (Huth et al., 2021). The strength centrality and its uncertainty can be visualized with a plot generated by<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>plot_centrality(fit)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and is shown in Figure 6. The nodes are ordered by their strength centrality, with the most central node at the top. The dots indicate the strength centrality estimate, and the error bars are credible intervals that indicate the uncertainty associated with the centrality estimate. The wider the credible intervals, the more uncertain the particular strength centrality estimate. When the interval is very wide, researchers should be cautious about drawing strong inferential conclusions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 6<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Centrality Plot. The nodes correspond to the variables of the women and mathematics data set.<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbd605&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbd605\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"1013\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-1024x1013.webp\" alt=\"Centrality Plot. The nodes correspond to the variables of the women and mathematics data set.\" class=\"wp-image-4373\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-1024x1013.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-300x297.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-768x760.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-80x80.webp 80w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-110x110.webp 110w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-380x376.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-550x544.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-800x791.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-760x752.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6-600x593.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure6.webp 1099w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Prior Robustness<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">In the Bayesian approach, tests and estimates depend on the specification of prior distributions. It is good practice to assess how sensitive our inferences are to our prior choices. To assess this, we perform a prior robustness check. We reran our analysis for the women in mathematics data five times, each time changing the prior edge inclusion probability (i.e., <em>edge_prior<\/em> = 0<em>.<\/em>1<em>, <\/em>0<em>.<\/em>3<em>, <\/em>0<em>.<\/em>5<em>, <\/em>0<em>.<\/em>7<em>, <\/em>0<em>.<\/em>9). The full women in mathematics data set has many observations and few variables, and as a result, there was no change in edge categorization under the different prior specifications. To illustrate a more realistic scenario of the influence of the prior probability on edge inclusion, we took a subset of the data, by randomly selecting 200 observations. Figure 7 shows the change in edge categorization under the different prior inclusion probabilities. We see that the number of included edges remains the same, while the number of inconclusive edges increases at the expense of the number of excluded edges. In this subset of data, the edge inclusion is sensitive to the prior choice and one cannot be certain about the excluded edges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 7<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Prior Robustness Plot. The prior robustness for a subset of the women and mathematics data set. It shows how the edge categorization changes under different prior inclusion probabilities. The x-axis shows the prior edge inclusion probability, the y-axis a proportion of edges, and each line represents an edge categorization.<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbda5b&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbda5b\" class=\"wp-block-image size-large is-resized wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"618\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-1024x618.webp\" alt=\"Prior Robustness Plot. The prior robustness for a subset of the women and mathematics data set. It shows how the edge categorization changes under different prior inclusion probabilities. The x-axis shows the prior edge inclusion probability, the y-axis a proportion of edges, and each line represents an edge categorization.\" class=\"wp-image-4374\" style=\"width:700px;height:auto\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-1024x618.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-300x181.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-768x463.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-1536x927.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-380x229.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-550x332.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-800x483.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-1160x700.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-760x458.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-1100x664.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7-600x362.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure7.webp 1598w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Example: Contingencies of Self-Worth Scale<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We will further illustrate the package with a second example. This time the dataset consists of continuous variables for which <em>easybgm <\/em>uses <em>BDgraph<\/em> to fit the model. The dataset is on the \u201cContingencies of Self-Worth Scale\u201d and can again be loaded from within R (i.e., <em>BGGM::data(&#8220;csws&#8221;)<\/em>). The dataset consists of 35 variables and 680 observations. The variables were administered on a 7-point Likert scale. Using the lavaan R package (Rosseel, 2012), we aggregated the 35 items into the seven subscales with a confirmatory factor analysis and extracted the latent subscale scores for each individual. The network was estimated on the latent scores of the seven subscales: family support, competition, appearance, God\u2019s love, academic competence, virtue, and approval from others. The variables all form a single scale and should therefore all be related to each other. We incorporate this information into the estimation by specifying a prior edge inclusion probability that slightly favors the presence of edge (i.e., in <em>BDgraph g.prior<\/em> = 0<em>.<\/em>7). The full specification in <em>easybgm <\/em>is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fit = easybgm(data       = csws_ scales,\n              type       = \"continuous\",\n              Package    = \"BDgraph\",\n              g. prior   =  0.7,\n              iter       =  1 e4 ,\n              save       = TRUE,\n              Centrality = TRUE)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The results are shown in Figure 8. Although all subscales form a single scale, not all nodes are related. Four edges show evidence for conditional independence, i.e., no relation between subscales, and another four edges show insufficient evidence to conclude either inclusion or exclusion (see Figure 8a). The remaining edges show evidence for conditional dependence between nodes; the respective two subscales are associated even after controlling for the influence of the other subscales. The present edges are mostly strongly positive (see Figure 8b). The strongest edge is found between <em>academic competence <\/em>and <em>competition<\/em>. Three edges show negative associations: <em>virtue <\/em>and <em>appearance<\/em>, <em>competition and approval from others, <\/em>as well as<em> God\u2019s love <\/em>and<em> appearance. <\/em>The <em>God\u2019s love <\/em>subscale shows the fewest and weakest connections with all other subscales. In fact, the relations with three other subscales show strong evidence of absence. Thus, the subscale appears to be disconnected from the others in the scale, suggesting that it measures a distinct aspect of the contingencies of self-worth. Self-worth through <em>God\u2019s love <\/em>is not necessarily related to other aspects of self-worth.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Figure 8<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Contingencies of Self-Worth Example Plots.&nbsp; (a) Edge evidence plot showing the evidence for inclusion or exclusion. In this graph, the blue edges represent edges with posterior evidence for presence, the red edges evidence for absence, and the gray edges have insufficient evidence to conclude either way. (b) Network plot in which the edges represent partial associations estimated to be present. The thickness of the edges corresponds to the strength of the effect, and the colors represent positive (blue) and negative (red) associations.<\/em><\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a53ad5fbdf55&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a53ad5fbdf55\" class=\"wp-block-image size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"430\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1024x430.webp\" alt=\"Contingencies of Self-Worth Example Plots.\u00a0 (a) Edge evidence plot showing the evidence for inclusion or exclusion. In this graph, the blue edges represent edges with posterior evidence for presence, the red edges evidence for absence, and the gray edges have insufficient evidence to conclude either way. (b) Network plot in which the edges represent partial associations estimated to be present. The thickness of the edges corresponds to the strength of the effect, and the colors represent positive (blue) and negative (red) associations.\" class=\"wp-image-4375\" srcset=\"https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1024x430.webp 1024w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-300x126.webp 300w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-768x323.webp 768w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1536x645.webp 1536w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-2048x860.webp 2048w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-380x160.webp 380w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-550x231.webp 550w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-800x336.webp 800w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1160x487.webp 1160w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-760x319.webp 760w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1100x462.webp 1100w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-1600x672.webp 1600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-2320x974.webp 2320w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-600x252.webp 600w, https:\/\/advances.in\/psychology\/wp-content\/uploads\/figure8-scaled.webp 2560w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Concluding Remarks<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The network approach has gained popularity in the social sciences, especially in (clinical) psychology. Recent Bayesian advances allow us to overcome common criticisms of existing frequentist methods by providing a solid quantification of uncertainty and thus more robust inference (Fried &amp; Cramer, 2017; Huth et al., 2023; Marsman &amp; Rhemtulla, 2022; McNally, 2021). The benefits of applying Bayesian analysis to networks are promising and are likely to further advance the field (Marsman &amp; Haslbeck, 2023; Williams &amp; Mulder, 2020a). The ability to test for conditional independence is the cornerstone of using networks to <a href=\"https:\/\/advances.in\/psychology\/10.56296\/aip00012\/\" data-type=\"post\" data-id=\"4555\">generate causal hypotheses<\/a> (Ryan et al., 2022; Sekulovski, Keetelaar, Huth, Wagenmakers, et al., 2023). This benefit has been hidden from a large proportion of researchers due to the required programming skills. With <em>easybgm<\/em>, we lower the threshold of the required programming experience. In doing so, we make the benefits of the Bayesian methodology accessible to the entire research community, which is essential for robust inference, theory building, and the advancement of the field in general.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>easybgm<strong> <\/strong><\/em>is aimed at inexperienced R users. They will be able to move from frequentist estimation, with its potential drawbacks, to the Bayesian analysis of networks and thus improve their inference. This is made possible by the simple code, default prior options, and extensive visualization suite. Experienced R users will also benefit from this package. They can still use the more complex features of the underlying packages, such as informed priors and sampling options while benefiting from user-friendly output. Most importantly, both groups will benefit from the comprehensive suite of visualization options. <em>easybgm<\/em> is optimized for researchers fitting graphical models in the social sciences, rather than in the medical and neurosciences, where the models are much larger. Nevertheless, researchers in both fields will be able to improve the visualization and interpretability of their results using the features of <em>easybgm<\/em>. Future versions of <em>easybgm <\/em>will focus on adding more diagnostic information about the Bayesian sampling procedure, such as trace plots and convergence measures, as well as prior robustness checks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In summary, <em>easybgm <\/em>provides researchers with a user-friendly tool for estimating and interpreting the results of Bayesian analysis of networks without restricting the user to standard features. While Bayesian methods for graphical modeling have been around for several years, their use in applied research has been limited. We hope that <em>easybgm <\/em>will bridge this gap and allow the growing field of network psychometrics to fully transition to robust uncertainty quantification with Bayesian estimation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a>A<\/a>cknowledgements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A preprint of this article was uploaded to <a href=\"https:\/\/psyarxiv.com\/8f72p\" target=\"_blank\" rel=\"noopener\">https:\/\/psyarxiv.com\/8f72p<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conflicts of Interest<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The authors declare that there were no conflicts of interest with respect to the authorship or the publication of this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Supplemental Materials<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Readers can download <em>easybgm <\/em>from <a href=\"https:\/\/cran.rstudio.com\/web\/packages\/easybgm\/\" target=\"_blank\" rel=\"noopener\">CRAN<\/a> as well as <a href=\"https:\/\/github.com\/KarolineHuth\/easybgm\" target=\"_blank\" rel=\"noopener\">Github<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They can also find all analysis code, figures, and the raw LATEX-files from this manuscript on the OSF repository: <a href=\"https:\/\/osf.io\/n9h5f\/\" target=\"_blank\" rel=\"noopener\">https:\/\/osf.io\/n9h5f\/<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Endnotes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a id=\"_ftn1\" href=\"#_ftnref1\">[1]<\/a> In practice, Equation 1 can be difficult to solve analytically, which means that the posterior distribution cannot easily be described. To estimate the posterior distribution, Bayesian approaches often use simulation methods such as Markov Chain Monte-Carlo (MCMC) to sample values from the posterior distribution and then compute quantities of interest (e.g., the posterior mean) using the simulated values (Van Ravenzwaaij et al.<a href=\"#_bookmark55\">,<\/a> 2018).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"#_ftnref2\">[2]<\/a> We refer the interested reader to Sekulovski, Keetelaar, Huth, Wagenmakers, van Bork, et al. (2023) for further elaboration on the differences between these methods in the context of testing conditional independence.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"#_ftnref3\">[3]<\/a> The annotated analysis scripts can be found in the OSF repository: <a href=\"https:\/\/osf.io\/n9h5f\/\" target=\"_blank\" rel=\"noopener\">https:\/\/osf.io\/n9h5f\/<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"#_ftnref4\">[4]<\/a> The specific prior arguments are subject to change depending on changes in the underlying packages. The current specifications apply to <em>BGGM <\/em>(version 2.1.1), <em>BDgraph <\/em>(version 2.72), and <em>bgms <\/em>(version 0.1.3).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Barbieri, M. M., &amp; Berger, J. O. (2004). Optimal predictive model selection. <em>Annals of <a><\/a>Statistics<\/em>, <em>32 <\/em>(3), 870\u2013897. <a href=\"https:\/\/doi.org\/10.1214\/009053604000000238\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/009053604000000238<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Barbieri, M. M., Berger, J. O., George, E. I., &amp; Ro\u010dkov\u00e1, V. (2020). The median probability <a><\/a>model and correlated variables. <em>Bayesian Analysis<\/em>, 1\u201328. <a href=\"https:\/\/doi.org\/10.1214\/20-BA1249\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/20-BA1249<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Borsboom, D., Deserno, M. K., Rhemtulla, M., Epskamp, S., Fried, E. I., McNally, R. J., Robinaugh, D. J., Perugini, M., Dalege, J., Costantini, G., Isvoranu, A.-M., Wysocki, A. C., van Borkulo, C. D., van Bork, R., &amp; Waldorp, L. J. (2021). Network analysis of multivariate data in psychological science. <em>Nature Reviews Methods Primers<\/em>,<em> 1<\/em>(1), 58. <a href=\"https:\/\/doi.org\/10.1038\/s43586-021-00055-w\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1038\/s43586-021-00055-w<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bullmore, E. T., &amp; Bassett, D. S. (2011). Brain graphs: graphical models of the human <a><\/a>brain connectome. <em>Annual review of clinical psychology<\/em>, <em>7<\/em>, 113\u2013140. <a href=\"https:\/\/doi.org\/10.1146\/annurev-clinpsy-040510-143934\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1146\/annurev-clinpsy-040510-143934<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Butts, C. T. (2008). network: A package for managing relational data in <em>R<\/em>. <em>Journal of <a><\/a>Statistical Software<\/em>, <em>24 <\/em>(2). <a href=\"https:\/\/doi.org\/10.18637\/jss.v024.i02\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v024.i02<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Csardi, G., &amp; Nepusz, T. (2006). The igraph software package for complex network <a><\/a>research. <em>InterJournal, complex systems<\/em>, <em>1695 <\/em>, 1\u20139.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dobra, A., &amp; Lenkoski, A. (2011). Copula Gaussian graphical models and their application to modeling functional disability data. <em>The Annals of Applied Statistics<\/em>, <em>5<\/em>. <a href=\"https:\/\/doi.org\/10.1214\/10-AOAS397\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/10-AOAS397<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Epskamp, S., Borsboom, D., &amp; Fried, E. I. (2018). Estimating psychological networks and their accuracy: A tutorial paper. <em>Behavior Research Methods<\/em>, <em>50<\/em>, 195\u2013212. <a href=\"https:\/\/doi.org\/10.3758\/s13428-017-0862-1\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.3758\/s13428-017-0862-1<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Epskamp, S., Cramer, A. O. J., Waldorp, L. J., Schmittmann, V. D., &amp; Borsboom, D. (2012). qgraph: Network visualizations of relationships in psychometric data. <a><\/a>&nbsp;<em>Journal of Statistical Software<\/em>, <em>48<\/em>. <a href=\"https:\/\/doi.org\/10.18637\/jss.v048.i04\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v048.i04<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fowlkes, E. B., Freeny, A. E., &amp; Landwehr, J. M. (1988). Evaluating logistic models for large contingency tables. <em>Journal of the American Statistical Association<\/em>, <em>83 <\/em>(403), <a><\/a>611\u2013622. <a href=\"https:\/\/doi.org\/10.1080\/01621459.1988.10478640\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1080\/01621459.1988.10478640<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fried, E. I., &amp; Cramer, A. O. J. (2017). Moving forward: Challenges and directions for psychopathological network theory and methodology. <em>Perspectives on Psychological Science<\/em>, <em>12<\/em>, 999\u20131020. <a href=\"https:\/\/doi.org\/10.1177\/1745691617705892\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1177\/1745691617705892<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Handcock, M. S., Hunter, D. R., Butts, C. T., Goodreau, S. M., &amp; Morris, M. (2008). stat-net: Software tools for the representation, visualization, analysis and simulation <a><\/a>of network data. <em>Journal of Statistical Software<\/em>, <em>24<\/em>. <a href=\"https:\/\/doi.org\/10.18637\/jss.v024.i01\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v024.i01<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Haslbeck, J., &amp; Waldorp, L. (2015). Mgm: Estimating time-varying mixed graphical <a><\/a>models in high-dimensional data. <em>Journal of Statistical Software<\/em>, 1\u201349. <a href=\"https:\/\/doi.org\/10.18637\/jss.v093.i08\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v093.i08<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hinne, M., Gronau, Q. F., van den Bergh, D., &amp; Wagenmakers, E.-J. (2020). A conceptual introduction to Bayesian Model Averaging. <em>Advances in Methods and Practices in <a><\/a>Psychological Science<\/em>, <em>3<\/em>, 200\u2013215. <a href=\"https:\/\/doi.org\/10.1177\/2515245919898657\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1177\/2515245919898657<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hoeting, J., Madigan, D., Raftery, A., &amp; Volinsky, C. (1999). Bayesian model averaging: <a><\/a>A tutorial. <em>Statistical Science<\/em>, <em>14 <\/em>(4), 382\u2013401. <a href=\"https:\/\/doi.org\/10.1214\/ss\/1009212519\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/ss\/1009212519<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Huth, K., Luigjes, J., Marsman, M., Goudriaan, A., &amp; van Holst, R. (2021). Modeling alcohol use disorder as a set of interconnected symptoms -assessing differences between clinical and population samples and across external factors. <em>Addictive Behaviors<\/em>, <em>125<\/em>, <a><\/a>107128.&nbsp; <a href=\"https:\/\/doi.org\/10.1016\/j.addbeh.2021.107128\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1016\/j.addbeh.2021.107128<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Huth, K. B. S., de Ron, J., Goudriaan, A. E., Luigjes, J., Mohammadi, R., van Holst, R. J., Wagenmakers, E.-J., &amp; Marsman, M. (2023). Bayesian analysis of cross-sectional networks: A tutorial in R and JASP. <em>Advances in Methods and Practices in Psychological Science<\/em>,<em> 6<\/em>(4), 25152459231193334. <a href=\"https:\/\/doi.org\/10.1177\/25152459231193334\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1177\/25152459231193334<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ising, E. (1925). Beitrag zur Theorie des Ferromagnetismus. <em>Zeitschrift f\u00fcr Physik<\/em>, <em>31<\/em>, <a><\/a>253\u2013258. <a href=\"https:\/\/doi.org\/10.1007\/BF02980577\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1007\/BF02980577<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a><\/a>Jeffreys, H. (1961). <em>Theory of probability <\/em>(3rd ed.). Oxford University Press.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kass, R. E., &amp; Raftery, A. E. (1995). Bayes Factors. <em>Journal of the American Statistical<a><\/a> Association<\/em>, <em>90<\/em>, 773\u2013795. <a href=\"https:\/\/doi.org\/10.1080\/01621459.1995.10476572\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1080\/01621459.1995.10476572<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lauritzen, S. L. (1996). <em>Graphical models <\/em>(Vol. 17). Clarendon Press.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lauritzen, S. L., &amp; Sheehan, N. A. (2003). Graphical models for genetic analyses. <em>Statistical Science<\/em>, 489\u2013514. <a href=\"https:\/\/doi.org\/10.1214\/ss\/1081443232\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/ss\/1081443232<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lauritzen, S. L., &amp; Wermuth, N. (1989). Graphical models for associations between vari- ables, some of which are qualitative and some quantitative. <em>The Annals of Statistics<\/em>, <a><\/a>&nbsp;<em>17<\/em>, 31\u201357. <a href=\"https:\/\/doi.org\/10.1214\/aos\/1176347003\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/aos\/1176347003<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Marsman, M., &amp; Haslbeck, J. M. B. (2023). <em>Bayesian analysis of the ordinal Markov <a><\/a>random field <\/em>(preprint). PsyArXiv. <a href=\"https:\/\/doi.org\/10.31234\/osf.io\/ukwrf\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.31234\/osf.io\/ukwrf<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Marsman, M., Huth, K., Waldorp, L., &amp; Ntzoufras, I. (2022). Objective Bayesian edge screening and structure selection for networks of binary variables. <em>Psychometrika<\/em>, <a><\/a>&nbsp;<em>87<\/em>, 47\u201382. <a href=\"https:\/\/doi.org\/10.1007\/s11336-022-09848-8\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1007\/s11336-022-09848-8<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Marsman, M., &amp; Rhemtulla, M. (2022). Guest editors\u2019 introduction to the special issue \u201cNetwork Psychometrics in Action\u201d: Methodological innovations inspired by empir<a><\/a>ical problems. <em>Psychometrika<\/em>, <em>87<\/em>, 1\u201311. <a href=\"https:\/\/doi.org\/10.1007\/s11336-022-09861-x\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1007\/s11336-022-09861-x<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Marsman, M., van den Bergh, D., &amp; Sekulovski, N. (2023). bgms: Bayesian variable selection for networks of binary and\/or ordinal variables [Computer software manual]. Retrieved from <a href=\"https:\/\/CRAN.R-project.org\/package%3Dbgms\" target=\"_blank\" rel=\"noopener\">https:\/\/CRAN.R-project.org\/package=bgms<\/a> (R package version <a><\/a>0.1.1)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Marsman, M., Waldorp, L., Dablander, F., &amp; Wagenmakers, E. (2019). Bayesian estimation of explained variance in ANOVA designs. <em>Statistica Neerlandica<\/em>, stan.12173. <a href=\"https:\/\/doi.org\/10.1111\/stan.12173\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1111\/stan.12173<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">McNally, R. J. (2021). Network analysis of psychopathology: Controversies and challenges. <em>Annual Review of Clinical Psychology<\/em>, <em>17<\/em>, 1.1-1.23. <a href=\"https:\/\/doi.org\/10.1146\/annurev-clinpsy-081219-092850\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1146\/annurev-clinpsy-081219-092850<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mohammadi, R., Abegaz, F., van den Heuvel, E., &amp; Wit, E. C. (2017). Bayesian modelling of Dupuytren disease by using Gaussian copula graphical models. <em>Journal of the Royal Statistical Society: Series C (Applied Statistics)<\/em>, <em>66 <\/em>, 629\u2013645. <a href=\"https:\/\/doi.org\/10.1111\/rssc.12171\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1111\/rssc.12171<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mohammadi, R., &amp; Wit, E. C. (2015). Bayesian structure learning in sparse Gaussian <a><\/a>graphical models. <em>Bayesian Analysis<\/em>, <em>10 <\/em>. <a href=\"https:\/\/doi.org\/10.1214\/14-BA889\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/14-BA889<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mohammadi, R., &amp; Wit, E. C. (2019). BDgraph: An R package for Bayesian structure learning in graphical models. <em>Journal of Statistical Software<\/em>, <em>89<\/em>. <a href=\"https:\/\/doi.org\/10.18637\/jss.v089.i03\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v089.i03<\/a><a><\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mulder, J., &amp; Pericchi, L. R. (2018). The matrix-F prior for estimating and testing<a><\/a> covariance matrices. <em>Bayesian Analysis<\/em>, <em>13<\/em>. <a href=\"https:\/\/doi.org\/10.1214\/17-BA1092\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1214\/17-BA1092<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Newman, M. E., Watts, D. J., &amp; Strogatz, S. H. (2002). Random graph models of social <a><\/a>networks. <em>Proceedings of the National Academy of Sciences<\/em>, <em>99<\/em>, 2566\u20132572. <a href=\"https:\/\/doi.org\/10.1073\/pnas.012582999\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1073\/pnas.012582999<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">R-Core-Team. (2024). <em>R: A language and environment for statistical computing. <\/em>Vienna, Austria: R Foundation for Statistical Computing. Retrieved from <a href=\"https:\/\/www.R-project.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.R<\/a><a><\/a><a href=\"https:\/\/www.R-project.org\/\" target=\"_blank\" rel=\"noopener\">-project.org\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rosseel, Y. (2012). lavaan: An Rpackage for structural equation modeling. <em>Journal of <a><\/a>Statistical Software<\/em>, <em>48<\/em>. <a href=\"https:\/\/doi.org\/10.18637\/jss.v048.i02\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.18637\/jss.v048.i02<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Roverato, A. (2002). Hyper inverse Wishart distribution for non-decomposable graphs and its application to Bayesian inference for Gaussian graphical models. <em>Scandinavian <a><\/a>Journal of Statistics<\/em>, <em>29 <\/em>(3), 391\u2013141. <a href=\"https:\/\/doi.org\/10.1111\/1467-9469.00297\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1111\/1467-9469.00297<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ryan, O., Bringmann, L. F., &amp; Schuurman, N. K. (2022). The challenge of generating causal hypotheses using network models. <em>Structural Equation Modeling: A Multidisciplinary Journal<\/em>, <em>29<\/em>, 953\u2013970. Retrieved from <a href=\"https:\/\/doi.org\/10.1080\/10705511.2022.2056039\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1080\/10705511.2022.2056039<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sekulovski, N., Keetelaar, S., Haslbeck, J. M. B., &amp; Marsman, M. (2023). <em>Sensitivity analysis of prior distributions in Bayesian graphical modeling: Guiding informed prior choices for conditional independence testing <\/em>(preprint). PsyArXiv. <a href=\"https:\/\/doi.org\/10.31234\/osf.io\/6m7ca\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.31234\/osf.io\/6m7ca<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sekulovski, N., Keetelaar, S., Huth, K., Wagenmakers, E.-J., van Bork, R., van den Bergh, D., &amp; Marsman, M. (2023). <em>Testing conditional independence in psychometric net- works: An analysis of three bayesian methods. <\/em>PsyArXiv. <a href=\"https:\/\/doi.org\/10.31234\/osf.io\/ch7a2\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.31234\/osf.io\/ch7a2<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">van Borkulo, C. D., Borsboom, D., Epskamp, S., Blanken, T. F., Boschloo, L., Schoevers, R. A., &amp; Waldorp, L. J. (2015). A new method for constructing networks from binary data. <em>Scientific Reports<\/em>, <em>4<\/em>, 5918. <a href=\"https:\/\/doi.org\/10.1038\/srep05918\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1038\/srep05918<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">van de Schoot, R., Schmidt, P., de Beuckelaer, A., Lek, K., &amp; Zondervan-Zwijnenburg, M. (2015). Editorial: Measurement invariance. <em>Frontiers in Psychology<\/em>, <em>6<\/em>, 1064. <a href=\"https:\/\/doi.org\/10.3389\/fpsyg.2015.01064\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.3389\/fpsyg.2015.01064<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Van Ravenzwaaij, D., Cassey, P., &amp; Brown, S. D. (2018). A simple introduction to Markov Chain Monte\u2013Carlo sampling. <em>Psychonomic Bulletin &amp; Review<\/em>, <em>25<\/em>, 143\u2013154. <a href=\"https:\/\/doi.org\/10.3758\/s13423-016-1015-8\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.3758\/s13423-016-1015-8<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wagenmakers, E.-J., Love, J., Marsman, M., Jamil, T., Ly, A., Verhagen, J., Selker, R., Gronau, Q. F., Dropmann, D., Boutin, B., Meerhoff, F., Knight, P., Raj, A., van Kesteren, E.-J., van Doorn, J., \u0160m\u00edra, M., Epskamp, S., Etz, A., Matzke, D., \u2026 Morey, R. D. (2018). Bayesian inference for psychology. Part II: Example applications with JASP. <em>Psychonomic Bulletin &amp; Review<\/em>,<em> 25<\/em>(1), 58-76. <a href=\"https:\/\/doi.org\/10.3758\/s13423-017-1323-7\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.3758\/s13423-017-1323-7<\/a>&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wagenmakers, E.-J., Morey, R. D., &amp;&nbsp; Lee, M. D. (2016). Bayesian benefits for the pragmatic researcher. <em>Current Directions in Psychological Science<\/em>, <em>25<\/em>, 169\u2013176. <a href=\"https:\/\/doi.org\/10.1177\/0963721416643289\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1177\/0963721416643289<\/a><a><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Williams, D. R., &amp; Mulder, J. (2020a). Bayesian hypothesis testing for Gaussian graphical models: Conditional independence and order constraints. <em>Journal of Mathematical <a><\/a>Psychology<\/em>, <em>99<\/em>, 102441. <a href=\"https:\/\/doi.org\/10.1016\/j.jmp.2020.102441\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.1016\/j.jmp.2020.102441<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Williams, D. R., &amp; Mulder, J. (2020b). BGGM: Bayesian Gaussian graphical models in R. <em>Journal of Open Source Software<\/em>, <em>5<\/em>, 2111. <a href=\"https:\/\/doi.org\/10.21105\/joss.02111\" target=\"_blank\" rel=\"noopener\">https:\/\/doi.org\/10.21105\/joss.02111<\/a><\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" id=\"end-references\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">APPENDIX<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Glossary: Bayesian graphical modeling<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Bayes Factor: <\/strong>A model comparison tool used in Bayesian statistics. It quantifies the relative strength of evidence for one model over another by comparing how well each model can predict the observed data. In Bayesian graphical modeling, it is often used to convey the evidence of edge inclusion over edge exclusion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Graphical Model: <\/strong>A statistical model that represents the relationships between random variables using a graph structure. It captures the probabilistic dependencies among variables (i.e., are two random variables associated).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Bayesian model-averaging: <\/strong>A technique used in Bayesian statistics to account for model uncertainty by averaging over a set of models weighted by their posterior probabilities. Rather than selecting a single \u201cbest\u201d model, it considers multiple models and combines their predictions or parameters to account for model uncertainty.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Credible interval: <\/strong>The Bayesian equivalent of the frequentist confidence interval. It denotes a range of values within which a parameter is believed to lie with <em>x<\/em>% probability; <em>x<\/em>% of the posterior distribution of the parameter lies in this interval.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Edge: <\/strong>A connection between nodes in a network. In the network models used here, edges represent conditional dependencies or interactions between nodes. They can be unweighted (representing the presence or absence of an association) or weighted (representing the strength of the partial associations). Weighted edges are denoted \u201cedge weights\u201d in this paper and contained in the matrix <strong>\u0398<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Highest Density Interval: <\/strong>In Bayesian statistics, the highest density interval (HDI) is a special version of the credible interval. In principle, one could specify many different <em>x<\/em>% credible intervals for a parameter, each covering <em>x<\/em>% of the probability in the posterior distribution. The highest density interval is the shortest of all such credible intervals, and is usually close to where the posterior density peaks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Likelihood: <\/strong>The likelihood indicates how likely it is that a particular value of a parameter produced the observed data. In Bayesian statistics, it is often expressed in terms of the probability of observing the data given specific values of the parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Network: <\/strong>In our paper, a network consists of nodes that represent some measured quantity (i.e., symptoms of a disorder or scores on an educational test) and edges that represent the association between two nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Node: <\/strong>A node represents a random variable and is represented in the graph as a circle.<br><strong>Prior Distribution: <\/strong>In Bayesian statistics, the prior distribution represents a researcher\u2019s degree of belief that a particular value of the parameter (or network structure) could plausibly produce the data to be observed. It may encapsulate existing information from previous research or researchers beliefs about the parameter\/structure values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Posterior Distribution: <\/strong>The posterior distribution is the result of updating the prior distribution with observed data using Bayes\u2019 rule. It conveys the posterior degree of belief that a particular value of the parameter (or network structure) was responsible for producing the observed data, and as such conveys everything that we now know.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Structure: <\/strong>The network structure is a specific configuration of unweighted dependencies between nodes in the network. It consists of unweighted and undirected edges that denote the conditional dependence between pairs of variables in the network, while the edges missing from the structure denote their conditional independence. In this paper, it is denoted by \\(\\mathcal{S}\\).<\/p>\n","protected":false},"excerpt":{"rendered":"By Karoline B. S. Huth, Sara Keetelaar, Nikola Sekulovski, Don van den Bergh, &#038; Maarten Marsman \n","protected":false},"author":1,"featured_media":4263,"comment_status":"closed","ping_status":"open","sticky":false,"template":"wpb-single-post.php","format":"standard","meta":{"_acf_changed":false,"rank_math_title":"Simplifying Bayesian analysis of graphical models for the social sciences with easybgm: A user-friendly R-package","rank_math_description":"Struggling with Bayesian graphical models? Discover easybgm, a user-friendly R package for network psychometrics. Read the tutorial.","rank_math_permalink":"","rank_math_robots":[],"csco_page_header_type":"title","csco_singular_sidebar":"default","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0,"footnotes":""},"categories":[97],"tags":[98,85,100,117,99],"class_list":["post-4256","post","type-post","status-publish","format-standard","has-post-thumbnail","category-methods","tag-bayesian-inference","tag-network-psychometrics","tag-r","tag-special-issue-on-network-psychometrics-2024","tag-tutorial","cs-entry","cs-video-wrap"],"acf":{"doi":"10.56296\/aip00010","contact_details":"Karoline B. S. Huth, k.huth@uva.nl, University of Amsterdam, Department of Psychology, Nieuwe Achtergracht 129B, PO Box 15906, 1001 NK Amsterdam, The Netherlands","article_received":"September 12, 2023","article_accepted":"February 29, 2024","article_published":"2024\/03\/15","abstract":"Network psychometrics models psychological constructs as interconnected variables. Rather than treating variables as independent entities, network analysis views them as nodes in a system that interact with each other; their interactions yield partial associations. Recently, researchers have emphasized the use of Bayesian methods in graphical modeling to accurately quantify uncertainty in the model and its parameters. Several R packages have been developed that implement different Bayesian estimation approaches for graphical modeling in R. However, they all require different inputs and produce different outputs, making them difficult to use for applied researchers. In this paper, we present a user-friendly R package called easybgm that combines the powerful analysis tools into a cohesive package for applied re-searchers. The package allows researchers to fit any type of cross-sectional data, extract results, and visualize findings with network, edge evidence, and structure uncertainty plots. We introduce the package and demonstrate its use with two examples.","article_keywords":"network psychometrics, Bayesian inference, tutorial, R","pdf_url":8801,"reviews":"The current article passed one round of double-blind peer review. The anonymous review report can be found <a href=\"https:\/\/doi.org\/10.56296\/aip00010.pr\">here.<\/a>\r\n\r\n&nbsp;","structured_authors":[{"schema_author_name":"Karoline B. S. Huth","schema_author_affiliation":"Department of Psychology, University of Amsterdam; Department of Psychiatry, Amsterdam UMC location University of Amsterdam; Centre for Urban Mental Health, University of Amsterdam","schema_author_orcid":"https:\/\/orcid.org\/0000-0002-0662-1591","schema_author_profile_url":"https:\/\/scholar.google.com\/citations?user=_0707qYAAAAJ&hl=en&oi=ao"},{"schema_author_name":"Sara Keetelaar","schema_author_affiliation":"Department of Psychology, University of Amsterdam","schema_author_orcid":"https:\/\/orcid.org\/0009-0000-8430-9758","schema_author_profile_url":"https:\/\/eur.academia.edu\/SaraKeetelaar"},{"schema_author_name":"Nikola Sekulovski","schema_author_affiliation":"Department of Psychology, University of Amsterdam","schema_author_orcid":"https:\/\/orcid.org\/0000-0001-7032-1684","schema_author_profile_url":"https:\/\/scholar.google.com\/citations?user=cn5deUoAAAAJ&hl=en&oi=sra"},{"schema_author_name":"Don van den Bergh","schema_author_affiliation":"Department of Psychology, University of Amsterdam","schema_author_orcid":"https:\/\/orcid.org\/0000-0002-9838-7308","schema_author_profile_url":"https:\/\/scholar.google.com\/citations?user=WbbKtuQAAAAJ&hl=en&oi=ao"},{"schema_author_name":"Maarten Marsman","schema_author_affiliation":"Department of Psychology, University of Amsterdam; Centre for Urban Mental Health, University of Amsterdam","schema_author_orcid":"https:\/\/orcid.org\/0000-0001-5309-7502","schema_author_profile_url":"https:\/\/scholar.google.com\/citations?user=WgN2S4sAAAAJ&hl=en&oi=ao"}],"schema_bibliography":"Barbieri, M. M., & Berger, J. O. (2004). Optimal predictive model selection. Annals of Statistics, 32 (3), 870\u2013897. https:\/\/doi.org\/10.1214\/009053604000000238\r\nBarbieri, M. M., Berger, J. O., George, E. I., & Ro\u010dkov\u00e1, V. (2020). The median probability model and correlated variables. Bayesian Analysis, 1\u201328. https:\/\/doi.org\/10.1214\/20-BA1249\r\nBorsboom, D., Deserno, M. K., Rhemtulla, M., Epskamp, S., Fried, E. I., McNally, R. J., Robinaugh, D. J., Perugini, M., Dalege, J., Costantini, G., Isvoranu, A.-M., Wysocki, A. C., van Borkulo, C. D., van Bork, R., & Waldorp, L. J. (2021). Network analysis of multivariate data in psychological science. Nature Reviews Methods Primers, 1(1), 58. https:\/\/doi.org\/10.1038\/s43586-021-00055-w \r\nBullmore, E. T., & Bassett, D. S. (2011). Brain graphs: graphical models of the human brain connectome. Annual review of clinical psychology, 7, 113\u2013140. https:\/\/doi.org\/10.1146\/annurev-clinpsy-040510-143934\r\nButts, C. T. (2008). network: A package for managing relational data in R. Journal of Statistical Software, 24 (2). https:\/\/doi.org\/10.18637\/jss.v024.i02\r\nCsardi, G., & Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, complex systems, 1695 , 1\u20139.\r\nDobra, A., & Lenkoski, A. (2011). Copula Gaussian graphical models and their application to modeling functional disability data. The Annals of Applied Statistics, 5. https:\/\/doi.org\/10.1214\/10-AOAS397\r\nEpskamp, S., Borsboom, D., & Fried, E. I. (2018). Estimating psychological networks and their accuracy: A tutorial paper. Behavior Research Methods, 50, 195\u2013212. https:\/\/doi.org\/10.3758\/s13428-017-0862-1\r\nEpskamp, S., Cramer, A. O. J., Waldorp, L. J., Schmittmann, V. D., & Borsboom, D. (2012). qgraph: Network visualizations of relationships in psychometric data.  Journal of Statistical Software, 48. https:\/\/doi.org\/10.18637\/jss.v048.i04\r\nFowlkes, E. B., Freeny, A. E., & Landwehr, J. M. (1988). Evaluating logistic models for large contingency tables. Journal of the American Statistical Association, 83 (403), 611\u2013622. https:\/\/doi.org\/10.1080\/01621459.1988.10478640\r\nFried, E. I., & Cramer, A. O. J. (2017). Moving forward: Challenges and directions for psychopathological network theory and methodology. Perspectives on Psychological Science, 12, 999\u20131020. https:\/\/doi.org\/10.1177\/1745691617705892\r\nHandcock, M. S., Hunter, D. R., Butts, C. T., Goodreau, S. M., & Morris, M. (2008). stat-net: Software tools for the representation, visualization, analysis and simulation of network data. Journal of Statistical Software, 24. https:\/\/doi.org\/10.18637\/jss.v024.i01\r\nHaslbeck, J., & Waldorp, L. (2015). Mgm: Estimating time-varying mixed graphical models in high-dimensional data. Journal of Statistical Software, 1\u201349. https:\/\/doi.org\/10.18637\/jss.v093.i08\r\nHinne, M., Gronau, Q. F., van den Bergh, D., & Wagenmakers, E.-J. (2020). A conceptual introduction to Bayesian Model Averaging. Advances in Methods and Practices in Psychological Science, 3, 200\u2013215. https:\/\/doi.org\/10.1177\/2515245919898657\r\nHoeting, J., Madigan, D., Raftery, A., & Volinsky, C. (1999). Bayesian model averaging: A tutorial. Statistical Science, 14 (4), 382\u2013401. https:\/\/doi.org\/10.1214\/ss\/1009212519\r\nHuth, K., Luigjes, J., Marsman, M., Goudriaan, A., & van Holst, R. (2021). Modeling alcohol use disorder as a set of interconnected symptoms -assessing differences between clinical and population samples and across external factors. Addictive Behaviors, 125, 107128.  https:\/\/doi.org\/10.1016\/j.addbeh.2021.107128 \r\nHuth, K. B. S., de Ron, J., Goudriaan, A. E., Luigjes, J., Mohammadi, R., van Holst, R. J., Wagenmakers, E.-J., & Marsman, M. (2023). Bayesian analysis of cross-sectional networks: A tutorial in R and JASP. Advances in Methods and Practices in Psychological Science, 6(4), 25152459231193334. https:\/\/doi.org\/10.1177\/25152459231193334 \r\nIsing, E. (1925). Beitrag zur Theorie des Ferromagnetismus. Zeitschrift f\u00fcr Physik, 31, 253\u2013258. https:\/\/doi.org\/10.1007\/BF02980577\r\nJeffreys, H. (1961). Theory of probability (3rd ed.). Oxford University Press.\r\nKass, R. E., & Raftery, A. E. (1995). Bayes Factors. Journal of the American Statistical Association, 90, 773\u2013795. https:\/\/doi.org\/10.1080\/01621459.1995.10476572\r\nLauritzen, S. L. (1996). Graphical models (Vol. 17). Clarendon Press.\r\nLauritzen, S. L., & Sheehan, N. A. (2003). Graphical models for genetic analyses. Statistical Science, 489\u2013514. https:\/\/doi.org\/10.1214\/ss\/1081443232\r\nLauritzen, S. L., & Wermuth, N. (1989). Graphical models for associations between vari- ables, some of which are qualitative and some quantitative. The Annals of Statistics,  17, 31\u201357. https:\/\/doi.org\/10.1214\/aos\/1176347003\r\nMarsman, M., & Haslbeck, J. M. B. (2023). Bayesian analysis of the ordinal Markov random field (preprint). PsyArXiv. https:\/\/doi.org\/10.31234\/osf.io\/ukwrf\r\nMarsman, M., Huth, K., Waldorp, L., & Ntzoufras, I. (2022). Objective Bayesian edge screening and structure selection for networks of binary variables. Psychometrika,  87, 47\u201382. https:\/\/doi.org\/10.1007\/s11336-022-09848-8\r\nMarsman, M., & Rhemtulla, M. (2022). Guest editors\u2019 introduction to the special issue \u201cNetwork Psychometrics in Action\u201d: Methodological innovations inspired by empirical problems. Psychometrika, 87, 1\u201311. https:\/\/doi.org\/10.1007\/s11336-022-09861-x\r\nMarsman, M., van den Bergh, D., & Sekulovski, N. (2023). bgms: Bayesian variable selection for networks of binary and\/or ordinal variables [Computer software manual]. Retrieved from https:\/\/CRAN.R-project.org\/package=bgms (R package version 0.1.1)\r\nMarsman, M., Waldorp, L., Dablander, F., & Wagenmakers, E. (2019). Bayesian estimation of explained variance in ANOVA designs. Statistica Neerlandica, stan.12173. https:\/\/doi.org\/10.1111\/stan.12173\r\nMcNally, R. J. (2021). Network analysis of psychopathology: Controversies and challenges. Annual Review of Clinical Psychology, 17, 1.1-1.23. https:\/\/doi.org\/10.1146\/annurev-clinpsy-081219-092850\r\nMohammadi, R., Abegaz, F., van den Heuvel, E., & Wit, E. C. (2017). Bayesian modelling of Dupuytren disease by using Gaussian copula graphical models. Journal of the Royal Statistical Society: Series C (Applied Statistics), 66 , 629\u2013645. https:\/\/doi.org\/10.1111\/rssc.12171\r\nMohammadi, R., & Wit, E. C. (2015). Bayesian structure learning in sparse Gaussian graphical models. Bayesian Analysis, 10 . https:\/\/doi.org\/10.1214\/14-BA889\r\nMohammadi, R., & Wit, E. C. (2019). BDgraph: An R package for Bayesian structure learning in graphical models. Journal of Statistical Software, 89. https:\/\/doi.org\/10.18637\/jss.v089.i03 \r\nMulder, J., & Pericchi, L. R. (2018). The matrix-F prior for estimating and testing covariance matrices. Bayesian Analysis, 13. https:\/\/doi.org\/10.1214\/17-BA1092\r\nNewman, M. E., Watts, D. J., & Strogatz, S. H. (2002). Random graph models of social networks. Proceedings of the National Academy of Sciences, 99, 2566\u20132572. https:\/\/doi.org\/10.1073\/pnas.012582999\r\nR-Core-Team. (2024). R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from https:\/\/www.R-project.org\/\r\nRosseel, Y. (2012). lavaan: An Rpackage for structural equation modeling. Journal of Statistical Software, 48. https:\/\/doi.org\/10.18637\/jss.v048.i02\r\nRoverato, A. (2002). Hyper inverse Wishart distribution for non-decomposable graphs and its application to Bayesian inference for Gaussian graphical models. Scandinavian Journal of Statistics, 29 (3), 391\u2013141. https:\/\/doi.org\/10.1111\/1467-9469.00297\r\nRyan, O., Bringmann, L. F., & Schuurman, N. K. (2022). The challenge of generating causal hypotheses using network models. Structural Equation Modeling: A Multidisciplinary Journal, 29, 953\u2013970. Retrieved from https:\/\/doi.org\/10.1080\/10705511.2022.2056039\r\nSekulovski, N., Keetelaar, S., Haslbeck, J. M. B., & Marsman, M. (2023). Sensitivity analysis of prior distributions in Bayesian graphical modeling: Guiding informed prior choices for conditional independence testing (preprint). PsyArXiv. https:\/\/doi.org\/10.31234\/osf.io\/6m7ca \r\nSekulovski, N., Keetelaar, S., Huth, K., Wagenmakers, E.-J., van Bork, R., van den Bergh, D., & Marsman, M. (2023). Testing conditional independence in psychometric net- works: An analysis of three bayesian methods. PsyArXiv. https:\/\/doi.org\/10.31234\/osf.io\/ch7a2\r\nvan Borkulo, C. D., Borsboom, D., Epskamp, S., Blanken, T. F., Boschloo, L., Schoevers, R. A., & Waldorp, L. J. (2015). A new method for constructing networks from binary data. Scientific Reports, 4, 5918. https:\/\/doi.org\/10.1038\/srep05918\r\nvan de Schoot, R., Schmidt, P., de Beuckelaer, A., Lek, K., & Zondervan-Zwijnenburg, M. (2015). Editorial: Measurement invariance. Frontiers in Psychology, 6, 1064. https:\/\/doi.org\/10.3389\/fpsyg.2015.01064\r\nVan Ravenzwaaij, D., Cassey, P., & Brown, S. D. (2018). A simple introduction to Markov Chain Monte\u2013Carlo sampling. Psychonomic Bulletin & Review, 25, 143\u2013154. https:\/\/doi.org\/10.3758\/s13423-016-1015-8\r\nWagenmakers, E.-J., Love, J., Marsman, M., Jamil, T., Ly, A., Verhagen, J., Selker, R., Gronau, Q. F., Dropmann, D., Boutin, B., Meerhoff, F., Knight, P., Raj, A., van Kesteren, E.-J., van Doorn, J., \u0160m\u00edra, M., Epskamp, S., Etz, A., Matzke, D., \u2026 Morey, R. D. (2018). Bayesian inference for psychology. Part II: Example applications with JASP. Psychonomic Bulletin & Review, 25(1), 58-76. https:\/\/doi.org\/10.3758\/s13423-017-1323-7  \r\nWagenmakers, E.-J., Morey, R. D., &  Lee, M. D. (2016). Bayesian benefits for the pragmatic researcher. Current Directions in Psychological Science, 25, 169\u2013176. https:\/\/doi.org\/10.1177\/0963721416643289\r\nWilliams, D. R., & Mulder, J. (2020a). Bayesian hypothesis testing for Gaussian graphical models: Conditional independence and order constraints. Journal of Mathematical Psychology, 99, 102441. https:\/\/doi.org\/10.1016\/j.jmp.2020.102441\r\nWilliams, D. R., & Mulder, J. (2020b). BGGM: Bayesian Gaussian graphical models in R. Journal of Open Source Software, 5, 2111. https:\/\/doi.org\/10.21105\/joss.02111","take_aways_repeater":[{"take_away_entry":"The easybgm R package is introduced to simplify Bayesian analysis of graphical models, making advanced network psychometrics more accessible to applied researchers who may not be experts in statistics."},{"take_away_entry":"This user-friendly package streamlines the entire workflow, from fitting models and extracting key results to creating publication-ready plots with just a few lines of code."},{"take_away_entry":"To further lower the barrier to entry, easybgm includes educational vignettes that guide researchers through the process of Bayesian analysis, helping to bridge the gap between complex statistical methods and practical application."}],"qas_repeater":[{"question_entry":"What is network psychometrics?","answer_entry":"<b>Network psychometrics<\/b>\u00a0is an approach in psychology where psychological concepts, like personality or mental disorders, are understood as\u00a0<b>systems of interacting components<\/b>. Instead of assuming an underlying factor causes symptoms or behaviors, this approach models the components (e.g., symptoms, attitudes, abilities) as\u00a0<b>nodes<\/b>\u00a0in a network. The relationships or interactions between these components are represented by\u00a0<b>edges<\/b>. Graphical models are used to estimate these connections, revealing how different psychological variables influence each other directly."},{"question_entry":"Why use Bayesian methods for psychological networks?","answer_entry":"Bayesian methods offer significant advantages for analyzing psychological networks. Primarily, they allow researchers to accurately\u00a0<b>quantify uncertainty<\/b>\u00a0about the estimated network. This includes uncertainty about the overall\u00a0<b>structure<\/b>\u00a0(which connections, or edges, are truly present or absent) and the\u00a0<b>parameters<\/b>\u00a0(the strength and direction of the existing connections). Using tools like the\u00a0<b>Bayes Factor<\/b>, researchers can weigh the evidence for including or excluding a specific edge, leading to more robust conclusions than traditional methods often allow."},{"question_entry":"What is the easybgm R package?","answer_entry":"<code>easybgm<\/code>\u00a0is a user-friendly\u00a0<b>R package<\/b>\u00a0designed to make\u00a0<b>Bayesian analysis of graphical models<\/b>\u00a0(networks) more accessible to researchers in the social sciences, especially psychology. It acts as a wrapper, integrating the functionalities of three powerful but more complex Bayesian network packages (<code>bgms<\/code>,\u00a0<code>BDgraph<\/code>, and\u00a0<code>BGGM<\/code>) into a single, cohesive workflow. It allows researchers to easily fit network models to various types of cross-sectional data, including\u00a0<b>continuous, binary, ordinal, or mixed data<\/b>."},{"question_entry":"What makes easybgm user-friendly?","answer_entry":"The\u00a0<code>easybgm<\/code>\u00a0package simplifies Bayesian network analysis in several ways:\r\n<ol>\r\n \t<li><b>Integration<\/b>: It combines three different Bayesian packages (<code>bgms<\/code>,\u00a0<code>BDgraph<\/code>,\u00a0<code>BGGM<\/code>) under one function, automatically selecting the appropriate backend based on the data type.<\/li>\r\n \t<li><b>Simplified Input<\/b>: Fitting a model requires only minimal input, primarily the dataset and the type of data (e.g., \u201ccontinuous\u201d, \u201cbinary\u201d).<\/li>\r\n \t<li><b>Consistent Output<\/b>: It extracts and standardizes the most important results (like edge weights, evidence metrics, structure information) from the different underlying packages into a consistent list format.<\/li>\r\n \t<li><b>Visualization Suite<\/b>: It includes a set of custom plotting functions to easily visualize network structures, edge evidence (using Bayes Factors), parameter uncertainty (using Highest Density Intervals), structure uncertainty, and node centrality.<\/li>\r\n<\/ol>"},{"question_entry":"How does easybgm help understand network uncertainty?","answer_entry":"<code>easybgm<\/code>\u00a0provides specific outputs and visualizations to help researchers grasp the uncertainty inherent in network estimation:\r\n<ol>\r\n \t<li><b>Edge Evidence<\/b>: It calculates the\u00a0<b>inclusion Bayes Factor<\/b>\u00a0(BF) for each potential edge, quantifying the evidence for the edge\u2019s presence versus its absence. The\u00a0<code>plot_edgeevidence()<\/code>\u00a0function visualizes this, coloring edges based on whether evidence supports inclusion, exclusion, or is inconclusive.<\/li>\r\n \t<li><b>Parameter Uncertainty<\/b>: For included edges, it provides estimates of their strength (edge weights) and uses posterior samples (if saved) to calculate\u00a0<b>Highest Density Intervals (HDIs)<\/b>, which show the range where the true edge weight likely lies. The\u00a0<code>plot_parameterHDI()<\/code>\u00a0function visualizes these intervals.<\/li>\r\n \t<li><b>Structure Uncertainty<\/b>: For packages that explore multiple network structures (<code>bgms<\/code>,\u00a0<code>BDgraph<\/code>),\u00a0<code>easybgm<\/code>\u00a0reports the\u00a0<b>posterior probabilities of different structures<\/b>. Functions like\u00a0<code>plot_structure_probabilities()<\/code>\u00a0and\u00a0<code>plot_complexity_probabilities()<\/code>\u00a0visualize how much certainty there is about the overall network configuration.<\/li>\r\n<\/ol>"}],"about_topic":"Graphical model","about_url":"https:\/\/en.wikipedia.org\/wiki\/Graphical_model","mention_entities":[{"entity_name":"Bayesian inference","sameas_url":"https:\/\/en.wikipedia.org\/wiki\/Bayesian_inference"},{"entity_name":"Psychometrics","sameas_url":"https:\/\/en.wikipedia.org\/wiki\/Psychometrics"},{"entity_name":"Ising model","sameas_url":"https:\/\/en.wikipedia.org\/wiki\/Ising_model"},{"entity_name":"R (programming language)","sameas_url":"https:\/\/en.wikipedia.org\/wiki\/R_(programming_language)"}],"citation_title":"Simplifying Bayesian analysis of graphical models for the social sciences with easybgm: A user-friendly R-package","citation_volume":"2","citation_firstpage":"e66366","citation_lastpage":"","citation_journal_title":"advances.in\/psychology","citation_issn":"2976-937X","citation_fulltext_html_url":"https:\/\/advances.in\/psychology\/10.56296\/aip00010\/","article-type":"methods-article","citation_author_list":[{"citation_author":"Huth, Karoline B. S."},{"citation_author":"Keetelaar, Sara "},{"citation_author":"Sekulovski, Nikola"},{"citation_author":"van den Bergh, Don "},{"citation_author":"Marsman, Maarten "}],"special_issue_title":"Network Psychometrics","special_issue_url":"https:\/\/advances.in\/psychology\/10.56296\/network-psychometrics\/","commentary":null,"replies_to_commentary":null,"commentary_reply":null},"_links":{"self":[{"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/posts\/4256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/comments?post=4256"}],"version-history":[{"count":0,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/posts\/4256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/media\/4263"}],"wp:attachment":[{"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/media?parent=4256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/categories?post=4256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/advances.in\/psychology\/wp-json\/wp\/v2\/tags?post=4256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}