*2.3. Procedure*

The instruments were administered to the community sample in an online format. Before administration, participants were asked to answer a series of questions to check that they could read and write correctly.

A trained psychologist administered the instruments to the sample of patients through individual interviews that took place in a room in the mental health center where they were being treated.

All participants (community sample and patients) were informed of the study objectives and the voluntary and anonymous nature of their participation and signed the informed consent form before completing the instruments. This study has been approved by the Bioethics Committee of Biomedical Research of Andalusia (Spain) (file number PI 040/18).

#### *2.4. Data Analysis*

The multivariate normality test revealed the absence of multivariate normality for skewness (Mardia = 60,874.19) and kurtosis (Mardia = 272.67). Therefore, the network was estimated using the GLASSO algorithm [27] in combination with the EBIC selection model (hyperparameter γ = 0.5) [28] applied to the nonparanormal transformation of the data set [29]. For the layout of the graph, the Fruchterman–Reingold algorithm was used [30]. The study's sample size (*n* = 985) was adequate to estimate the network according to the simulation study [31] (Supplementary Figure S1).

To detect community structures, the walktrap algorithm was employed [32]. The strength of centrality indices, one-step Expected Influence (EI1), and two-step Expected Influence

(EI2) were estimated [33]. Strength and EI provide information on the direct relationships between each node and the rest by summing the weights of the edges, considering the absolute values or the sign of the value (positive or negative), respectively. EI2 also sums the weights of indirectly related edges [33]. The stability of the centrality indices was quantified using a person-dropping bootstrap procedure that provides a correlationstability coefficient (CS-coefficient). CS-coefficient values > 0.5 indicate strong stability and interpretability [31].

In addition, predictability (i.e., the proportion of variance of each node that is explained by its neighboring nodes) was estimated [34], along with the Participation Coefficient (PC), and Participation Ratio (PR) [35]. Higher PC values indicate that the edges of the nodes are distributed more equally among the network communities, while higher PR values indicate nodes with more numerous and stronger edges. The PC and PR values were transformed to a scale of 0 to 1 for ease of interpretation.

Regarding the bridge nodes, the bridge strength, bridge EI1, and bridge EI2 were estimated [36]. Bridge strength and bridge EI1 indicate the total connectivity of each node with nodes of other communities with which it is directly related, by summing the weights of the edges that connect the node with nodes of other communities considering absolute values (bridge strength) or the sign of the values (bridge EI1). Bridge EI2 also considers indirect relationships with nodes in other communities. A blind cut-off point at the 80th percentile of bridge strength was applied to identify bridge nodes [37].

Finally, network invariance for men (*n* = 495) and women (*n* = 490) was analyzed using the network comparison test [38] (5000 times repeated subsampling). In addition, the invariance of network structure and overall strength was analyzed. The M statistic indicates the differences in the connections between the edges of both networks, while the S statistic indicates the difference in global strength between the two networks. If the test for network-structure invariance is significant, the invariance of the individual edges will be examined [38].

All analyses were conducted in R 4.1.2 and R-Studio 2022.2.0.443. In addition, the packages mvn 5.9 [39], bootnet 1.5 [31], igraph 1.3.0 [40], network tools 1.4.0 [36], qgraph 1.9.2 [41], and Network-ComparisonTest 2.2.1 [38] were used.
