<!DOCTYPE article
PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.2 20190208//EN" "JATS-archivearticle1-mathml3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" article-type="research-article"><?properties manuscript?><front><journal-meta><journal-id journal-id-type="nlm-journal-id">8704773</journal-id><journal-id journal-id-type="pubmed-jr-id">1656</journal-id><journal-id journal-id-type="nlm-ta">Am J Prev Med</journal-id><journal-id journal-id-type="iso-abbrev">Am J Prev Med</journal-id><journal-title-group><journal-title>American journal of preventive medicine</journal-title></journal-title-group><issn pub-type="ppub">0749-3797</issn><issn pub-type="epub">1873-2607</issn></journal-meta><article-meta><article-id pub-id-type="pmid">32951683</article-id><article-id pub-id-type="pmc">7508227</article-id><article-id pub-id-type="doi">10.1016/j.amepre.2020.04.015</article-id><article-id pub-id-type="manuscript">NIHMS1588673</article-id><article-categories><subj-group subj-group-type="heading"><subject>Article</subject></subj-group></article-categories><title-group><article-title>A guide for choosing community detection algorithms in social network studies: The Question-Alignment approach</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Smith</surname><given-names>Natalie R</given-names></name><degrees>MS</degrees><xref ref-type="aff" rid="A1">1</xref><xref ref-type="aff" rid="A2">2</xref></contrib><contrib contrib-type="author"><name><surname>Zivich</surname><given-names>Paul N</given-names></name><degrees>MPH</degrees><xref ref-type="aff" rid="A2">2</xref><xref ref-type="aff" rid="A3">3</xref></contrib><contrib contrib-type="author"><name><surname>Frerichs</surname><given-names>Leah</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="A1">1</xref></contrib><contrib contrib-type="author"><name><surname>Moody</surname><given-names>James</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="A4">4</xref><xref ref-type="aff" rid="A5">5</xref></contrib><contrib contrib-type="author"><name><surname>Aiello</surname><given-names>Allison E</given-names></name><degrees>PhD</degrees><xref ref-type="aff" rid="A2">2</xref><xref ref-type="aff" rid="A3">3</xref></contrib></contrib-group><aff id="A1"><label>1</label>Department of Health Policy and Management, Gillings School of Global Public Health, University of North Carolina at Chapel Hill</aff><aff id="A2"><label>2</label>Carolina Population Center, University of North Carolina at Chapel Hill</aff><aff id="A3"><label>3</label>Department of Epidemiology, Gillings School of Global Public Health, University of North Carolina at Chapel Hill</aff><aff id="A4"><label>4</label>Department of Sociology, Duke University</aff><aff id="A5"><label>5</label>King Abdulaziz University, Jeddah, Saudi Arabia</aff><author-notes><corresp id="CR1">Corresponding author information: Natalie R Smith, 1101 McGavran-Greenberg Hall, CB #7411, Chapel Hill, NC, 27599-7411, 412-977-1217, <email>natsmith@live.unc.edu</email></corresp></author-notes><pub-date pub-type="nihms-submitted"><day>1</day><month>5</month><year>2020</year></pub-date><pub-date pub-type="ppub"><month>10</month><year>2020</year></pub-date><pub-date pub-type="pmc-release"><day>01</day><month>10</month><year>2021</year></pub-date><volume>59</volume><issue>4</issue><fpage>597</fpage><lpage>605</lpage><!--elocation-id from pubmed: 10.1016/j.amepre.2020.04.015--><abstract id="ABS1"><sec id="S1"><title>Introduction:</title><p id="P1">Community detection, the process of identifying subgroups of highly connected individuals within a network, is an aspect of social network analysis that is relevant but potentially underutilized in prevention research. Guidance on using community detection methods stresses aligning methods with specific research questions but lacks clear operationalization. The Question-Alignment approach was developed to help address this gap and promote the high-quality use of community detection methods.</p></sec><sec id="S2"><title>Methods:</title><p id="P2">Six community detection methods are discussed: Walktrap, Edge-Betweenness, Infomap, Louvain, Label Propagation, and Spinglass. The Question-Alignment approach is described and demonstrated using real-world data collected in 2013. This hypothetical case study was conducted in 2019 and focused on targeting a hand hygiene intervention to high risk communities to prevent influenza transmission.</p></sec><sec id="S3"><title>Results:</title><p id="P3">Community detection using the Walktrap method best fit the hypothetical case study. The communities derived via Walktrap were quite different from communities derived via the other five methods in both the number of communities and individuals within communities.</p><p id="P4">There was evidence to support that the Question-Alignment approach can help researchers produce more useful community detection results: compared to other methods of selecting high risk groups, the Walktrap produced the most communities that met the hypothetical intervention requirements.</p></sec><sec id="S4"><title>Conclusions:</title><p id="P5">As prevention research incorporating social networks increases, researchers can use the Question-Alignment approach to produce more theoretically meaningful results and potentially more useful results for practice. Future research should focus on assessing if the Question-Alignment approach translates into improved intervention results.</p></sec></abstract></article-meta></front><body><sec id="S5"><title>Introduction</title><p id="P6">Social networks are related to health.<sup><xref rid="R1" ref-type="bibr">1</xref>-<xref rid="R3" ref-type="bibr">3</xref></sup> Social network analysis has emerged as one tool for evaluating and understanding relationships between individual health and social environments, as well as developing interventions to prevent disease and improve public health.<sup><xref rid="R4" ref-type="bibr">4</xref></sup>-<sup><xref rid="R6" ref-type="bibr">6</xref></sup> A variety of social network analytic methods are available to describe network composition, examine relationships between social networks and health, or identify the underlying group structure of social networks.<sup><xref rid="R2" ref-type="bibr">2</xref>,<xref rid="R7" ref-type="bibr">7</xref></sup></p><p id="P7">Identifying groups within social networks is a highly relevant but underutilized tool for public health and prevention research. Typically, due to the diversity of ties in real-world networks, groups within a network are unclear. Community detection, the process of identifying subgroups of highly connected individual within a network, is one popular class of methods. Community detection has been used to examine many public health topics including HIV/AIDS,<sup><xref rid="R8" ref-type="bibr">8</xref></sup> latrine ownership,<sup><xref rid="R9" ref-type="bibr">9</xref></sup> smoking cessation,<sup><xref rid="R10" ref-type="bibr">10</xref></sup> physical activity,<sup><xref rid="R11" ref-type="bibr">11</xref></sup> cancer treatment patterns,<sup><xref rid="R12" ref-type="bibr">12</xref></sup> and hospital service regions.<sup><xref rid="R13" ref-type="bibr">13</xref></sup> Within a social network, communities are groups of individuals who are densely connected to each other, but have few connections to other individuals in the network.<sup><xref rid="R14" ref-type="bibr">14</xref></sup> Once identified, community structures can help researchers examine if health tends to cluster within communities, or deliver targeted interventions to high-risk communities.<sup><xref rid="R5" ref-type="bibr">5</xref>,<xref rid="R14" ref-type="bibr">14</xref></sup>-<sup><xref rid="R17" ref-type="bibr">17</xref></sup> Targeting communities is potentially more appealing than targeting specific individuals because individuals are often more amenable to change when the whole group changes at once, or some interventions may be more naturally targeted towards groups rather than individuals.<sup><xref rid="R5" ref-type="bibr">5</xref></sup></p><p id="P8">There are many community detection methods, or algorithms, available to researchers who are interested in social networks. Algorithms rely on different heuristics to place individuals into mutually exclusive groups. Applying these algorithms is complicated, mainly due to ambiguity around which algorithm is best for a given circumstance.<sup><xref rid="R14" ref-type="bibr">14</xref>,<xref rid="R18" ref-type="bibr">18</xref></sup>-<sup><xref rid="R22" ref-type="bibr">22</xref></sup> Recent articles have attempted to provide guidance algorithm selection using criteria such as the mixing parameter of a network, computation time, or overlap with a simulated community structure.<sup><xref rid="R18" ref-type="bibr">18</xref>,<xref rid="R23" ref-type="bibr">23</xref></sup> Other work has noted that the optimal community detection method will depend on how the communities will be used.<sup><xref rid="R22" ref-type="bibr">22</xref></sup> Indeed, Yang <italic>et al</italic> specifically caution that guidance using criteria like computation time &#x0201c;have to be applied in conjunction with&#x02026; research questions. A pure application of the recommendations could bias the results.&#x0201d;<sup><xref rid="R18" ref-type="bibr">18</xref></sup> This appears to be generally acknowledged by community detection researchers,<sup><xref rid="R14" ref-type="bibr">14</xref>,<xref rid="R15" ref-type="bibr">15</xref>,<xref rid="R18" ref-type="bibr">18</xref></sup>-<sup><xref rid="R20" ref-type="bibr">20</xref>,<xref rid="R22" ref-type="bibr">22</xref></sup>-<sup><xref rid="R24" ref-type="bibr">24</xref></sup> but concrete demonstrations of how algorithms could be applied in conjunction with health promotion and disease prevention research questions are lacking.</p><p id="P9">Using a research question to drive algorithm choice allows researchers to leverage each algorithm&#x02019;s different properties to produce a result that best aligns with their question. This paper provides guidance to help prevention researchers with a background in network analysis align their research questions with publicly available community detection algorithms. This method, the Question-Alignment (QA) approach, is intended to help researchers align a research question with the most theoretically appropriate community detection algorithm. This approach may not necessarily lead to better results but is designed to help researchers identify the most theoretically appropriate algorithm for their research question. This method requires a clearly defined research question and an understanding of the specific heuristics employed by algorithms. To help researchers apply the QA approach, the paper provides: (1) an overview of six publicly available algorithms, (2) a discussion of research topics relevant to each algorithm, and (3) an applied example of the QA approach using real-world data.</p></sec><sec id="S6"><title>Algorithms Overview</title><p id="P10">To begin, overviews for several definitions necessary to understand the described community detection algorithms are provided. <italic>Modularity</italic> quantifies the density of links within communities compared to links between communities (ranges from &#x02212;1 to 1).<sup><xref rid="R16" ref-type="bibr">16</xref></sup>
<italic>Path lengths</italic> (or &#x02018;walks&#x02019; between two nodes) are the number of edges one would have to use to &#x02018;walk&#x02019; from one node to another. The <italic>shortest path length</italic> is the path between two nodes that involves traveling down the minimal number of edges.<sup><xref rid="R25" ref-type="bibr">25</xref></sup> A <italic>random walk</italic> is a path between two nodes where each step is randomly chosen.<sup><xref rid="R25" ref-type="bibr">25</xref></sup>
<italic>Dendrograms</italic> are tree diagrams returned by some algorithms that visualize community divisions at each step of the algorithm.<sup><xref rid="R14" ref-type="bibr">14</xref></sup></p><p id="P11">Six popular algorithms are considered. These algorithms are readily available in the R <italic>igraph</italic> package,<sup><xref rid="R26" ref-type="bibr">26</xref></sup> have shown good computational performance in networks of less than 1000 nodes,<sup><xref rid="R18" ref-type="bibr">18</xref></sup> and have distinct features: Edge-Betweenness,<sup><xref rid="R27" ref-type="bibr">27</xref></sup> Random Walktrap,<sup><xref rid="R28" ref-type="bibr">28</xref></sup> Label Propagation,<sup><xref rid="R29" ref-type="bibr">29</xref></sup> Infomap,<sup><xref rid="R30" ref-type="bibr">30</xref></sup> Louvain,<sup><xref rid="R31" ref-type="bibr">31</xref></sup> and Spinglass.<sup><xref rid="R32" ref-type="bibr">32</xref></sup>
<xref rid="T1" ref-type="table">Table 1</xref> provides a high-level overview of each algorithm and outlines features that researchers may be interested in, such as their ability to handle directed networks or be customized. Algorithms are classified as divisive, agglomerative, or optimization based. Further information on each algorithm is available in the <xref rid="SD1" ref-type="supplementary-material">Appendix</xref>.</p><sec id="S7"><title>Divisive</title><p id="P12">Divisive algorithms begin with a complete network and iteratively divide the network into smaller communities. The Edge-Betweenness algorithm is one divisive method that defines communities by iteratively removing edges that have a high likelihood of linking separate communities.<sup><xref rid="R27" ref-type="bibr">27</xref></sup> This algorithm continues until the full network has been completely divided (i.e., each node is its own community) and returns a dendrogram.</p></sec><sec id="S8"><title>Agglomerative</title><p id="P13">Agglomerative algorithms begin by considering each node as its own community and then iteratively combine nodes into larger communities. The Walktrap method is based on the premise that nodes within communities are likely to be connected by shorter random &#x0201c;walks&#x0201d;.<sup><xref rid="R28" ref-type="bibr">28</xref></sup> Communities are iteratively merged together by minimizing the overall distance between nodes and communities, defined by random walks. The maximum path length of the random walks can be specified to result in more close-knit or more diverse communities. The algorithm continues until all nodes in the network are merged into a single community and returns a dendrogram. Label Propagation identifies communities through the transmission of labels between nodes.<sup><xref rid="R29" ref-type="bibr">29</xref></sup> Each node starts with a unique label, and randomly selected nodes adopt the label of the majority of its neighbors. The algorithm stops when every node has the same label as the majority of adjacent nodes.</p></sec><sec id="S9"><title>Optimization based</title><p id="P14">The main feature of optimization algorithms is finding the optimal solution for a pre-specified objective function. The global optimum for modularity can be calculated using cluster_optimal() in the R <italic>igraph</italic> package.<sup><xref rid="R26" ref-type="bibr">26</xref></sup> Due to the complexity of finding the global optimum for moderately sized networks (100+ nodes), other algorithms, which we focus on here, seek to more efficiently come to a solution. The Louvain algorithm, also known as Multilevel algorithm, is an efficient algorithm that seeks to maximize modularity by merging nodes into communities.<sup><xref rid="R31" ref-type="bibr">31</xref></sup> The algorithm stops when no merges result in a modularity increase. The Spinglass algorithm optimizes a function that rewards edges with a community and penalizes edges between communities and stops when that function is minimized. That function can be modified to place a bigger (or smaller) emphasis on edges within communities. Finally, the Infomap algorithm focuses on optimizing the flow of information throughout a network.<sup><xref rid="R30" ref-type="bibr">30</xref></sup> Communities are iteratively merged together to optimize information flow and the algorithm stops when no further optimization is possible.</p></sec></sec><sec id="S10"><title>The Question-Alignment Approach</title><p id="P15">Similar to prior guidance,<sup><xref rid="R18" ref-type="bibr">18</xref>,<xref rid="R19" ref-type="bibr">19</xref>,<xref rid="R23" ref-type="bibr">23</xref></sup> the Question-Alignment approach compels researchers to choose a community detection algorithm based on a specific research question, rather than other criteria such as computation time or convenience. Researchers should first clearly define their research question. Second, they should state how community detection will be used to answer that research question. Then, researchers should answer the following three guiding questions:</p><list list-type="bullet" id="L2"><list-item><p id="P16">What biological, social, or behavioral process are driving the formation of specific communities within a network?</p></list-item><list-item><p id="P17">How might the main health variables of interest influence properties of the social network? How are they influenced by the network?</p></list-item><list-item><p id="P18">What do ties represent in the network (e.g., physical contact, communication channels, romantic relationships)?</p></list-item></list><p id="P19">Answers to these questions can then be aligned with and guide selection of a specific community detection algorithm. This approach helps researchers motivate and justify their algorithm selection. When the QA approach suggests multiple algorithms are appropriate, algorithms could be further selected based on stability<sup><xref rid="R33" ref-type="bibr">33</xref></sup> or researchers could use an ensemble of potential algorithms.<sup><xref rid="R34" ref-type="bibr">34</xref></sup></p></sec><sec id="S11"><title>Example Applications of the QA Approach</title><p id="P20">To help readers apply the QA approach in their own work, specific research topics in the fields of public health and disease prevention that could align with specific algorithms are discussed. Walktrap and Infomap are the two algorithms that define communities based on flow and may be the best suited for questions about transmission of information, communication, behaviors, or infectious disease. Walktrap would be preferred when researchers want flexibility in choosing community structures or the ability to explore several different cut points for communities since Walktrap returns a dendrogram. Infomap may be preferred if a researcher wants to use an algorithm with a clearly defined stopping rule or has a directed network. For example, researchers have attempted to create updated hospital service regions by identifying communities using patient-to-hospital flow data.<sup><xref rid="R13" ref-type="bibr">13</xref></sup> While these authors used the Louvain algorithm, it may have been more theoretically useful to derive communities using a flow-based algorithm like Walktrap or Infomap.</p><p id="P21">The Edge-Betweenness algorithm divides the network by iteratively removing edges. The resulting divisions in the dendrogram are different from the dendrogram produced by the Walktrap algorithm due to the different procedures used to identify communities (i.e., divisive vs. agglomerative; edge-betweenness vs. path length). This algorithm is essentially removing &#x02018;bridges&#x02019; between communities, allowing identification of people who link communities. Additionally, Edge-Betweenness indicates how efficiently the network can be split into disconnected pieces. This information is particularly helpful when trying to interrupt transmission within a network. By identifying which edges link groups together, these links can be targeted to prevent wider transmission across groups. The dendrogram output of Edge-Betweenness means these links can be identified at several levels. One potential use would be identifying which connections in a sexual network pose increased risk of transmission across groups underlying the network.</p><p id="P22">Label Propagation is a useful algorithm for researchers interested in modeling the adoption of social norms or an intervention because the algorithm defines communities based on iterative adoption processes. However, Label Propagation focuses on adoption that occurs when the majority of a specific node&#x02019;s adjacent nodes have adopted a label. Other adoption processes, such as adoption when one adjacent node adopts, or adoption when all adjacent nodes adopt, may not be represented well by this algorithm.</p><p id="P23">Algorithms that focus on minimizing outside connections while promoting within-community connections, such as Spinglass and Louvain, may be most valuable to researchers interested in using community detection results as part of a larger analytic strategy. After individuals are placed in communities, those communities could be used as clustering variables or fixed effects in standard linear modeling techniques. For example, a recent article identified communities using the Louvain algorithm.<sup><xref rid="R35" ref-type="bibr">35</xref></sup> The authors then compared the relative contribution of social network communities, schools, and neighborhoods to the total variance in adolescent body mass index in hierarchical linear models.<sup><xref rid="R35" ref-type="bibr">35</xref></sup> Researchers can also use community detection results to improve their estimation of causal effects. Estimation of causal effects in the presence of interference &#x02013; when one individual&#x02019;s treatment affects the outcome of their social ties &#x02013; requires special approaches.<sup><xref rid="R36" ref-type="bibr">36</xref></sup> Communities identified via Spinglass or Louvain may provide a good approximation of a structure where interference is present within communities, but not between (i.e., &#x02018;partial interference&#x02019;<sup><xref rid="R36" ref-type="bibr">36</xref>,<xref rid="R37" ref-type="bibr">37</xref></sup>). Community designations can then be used to calculate inverse probability weights extended for settings with interference.<sup><xref rid="R37" ref-type="bibr">37</xref></sup> In these scenarios, Spinglass may be preferred over Louvain for defining groups best meeting partial interference, since the tuning parameter of Spinglass can place greater emphasis on missing edges between communities, better satisfying the partial interference assumption.</p><p id="P24">In practice, researchers will also have to consider features of the algorithm and the network under study. For example, certain algorithms are only applicable to undirected networks. Researchers may choose to use an algorithm defined for directed networks or consider symmetrizing their network (i.e., transforming a directed network into an undirected network).</p></sec><sec id="S12"><title>An Example of the QA Approach</title><p id="P25">The QA approach is demonstrated using an undirected social network from the 2013 eX-FLU social networks and health randomized trial.<sup><xref rid="R38" ref-type="bibr">38</xref></sup> For clarity, analyses include the largest component of the network, which drops isolated nodes and other small groups on the periphery of the network. This data is used to help answer a hypothetical research question and illustrate how one might apply the QA approach to achieve more relevant analytic results. First, the example research question and algorithm chosen via the QA method are discussed. Then, the results under the chosen algorithm are compared to results under the five other algorithms presented in this paper. All analyses were conducted in 2019.</p><p id="P26">The illustrative example focuses on preventing influenza transmission with an intervention to promote optimal hand hygiene practices.<sup><xref rid="R39" ref-type="bibr">39</xref>,<xref rid="R40" ref-type="bibr">40</xref></sup> Organizations may be operating under limited resources and cannot afford to broadly disseminate this type of intervention. A researcher might ask: &#x0201c;Does an intervention delivered to high-risk communities decrease the incidence of influenza compared to a broadly disseminated intervention?&#x0201d; This question requires a researcher to identify high-risk groups to target. This can be done using community detection, and the Walktrap algorithm may be the most appropriate algorithm to use because it is most compatible with a person-to-person transmission model.</p><p id="P27">The Walktrap algorithm does not have a predefined stopping rule, and so there are 314 possible community structures resulting from the algorithm (<xref rid="F1" ref-type="fig">Figure 1</xref>), ranging from all nodes being their own community to all nodes being in one community. The community structure with the highest overall modularity was composed of 35 communities ranging in size from 2 to 44.</p><p id="P28"><xref rid="F2" ref-type="fig">Figure 2</xref> compares results obtained using the Walktrap vs. the other five algorithms, using the community division automatically returned by <italic>igraph</italic> for each. <xref rid="F2" ref-type="fig">Figure 2</xref> highlights the need for purposeful selection of an algorithm because the resulting community structure (i.e., number of communities, distribution of individuals within communities) can differ greatly based on algorithm. Analyses used the adjusted Rand index (AR) to compare each of the five alternative community structures to the Walktrap community structure. The AR index ranges from 0 to 1, with 0 indicating no overlap, and 1 indicating perfect overlap between two structures.<sup><xref rid="R41" ref-type="bibr">41</xref></sup>-<sup><xref rid="R43" ref-type="bibr">43</xref></sup> The algorithm that overlapped the most with Walktrap was Infomap (AR=0.72). Edge-betweenness, Spinglass, and Louvain all had similar amounts of overlap with Walktrap (AR=0.68 or 0.69) and Label Propagation had the least overlap with Walktrap (AR=0.55).</p><p id="P29">Finally, differences in returned community structure may influence the targeted selection of high-risk communities (<xref rid="F3" ref-type="fig">Figure 3</xref>). From the full set of communities identified within each algorithm, communities meeting the high-risk definition can be identified: communities that contain at least five individuals, &#x0003e;80% of whom have suboptimal hand hygiene behaviors (did not wash their hands at least 5 times a day for 20 seconds each<sup><xref rid="R38" ref-type="bibr">38</xref>,<xref rid="R44" ref-type="bibr">44</xref></sup>), and are connected to at least five other groups in the network (i.e., degree centrality<sup><xref rid="R7" ref-type="bibr">7</xref></sup> above five).</p><p id="P30">Using Walktrap, there are 3 medium-sized distinctive communities containing 39 people total that are considered high-risk. Those communities may be ideal for intervention delivery, especially because they are also connected to other communities in the network. All other algorithms identify only one or two communities that meet the high-risk criteria. Infomap returns results that are also practically relevant for this case study: one highly connected community with a high prevalence of suboptimal hand hygiene and one smaller community where 100% of individuals have suboptimal hand hygiene. Nonetheless, Walktrap is a better choice because it identifies more communities that meet the high-risk decision criteria and therefore reaches more total individuals (39 via Walktrap vs. 26 via Infomap). The other algorithms identify anywhere between 21 (Louvain) to 42 (Edge-Betweenness) individuals in high-risk communities, but almost all are less connected than the communities identified via the Walktrap algorithm. eX-FLU also collected information on what residence hall the students lived in. As an example of an alternative selection strategy, the residence hall with the highest proportion of suboptimal hand hygiene. There are 40 students in this chosen residence hall, of which 84% have suboptimal hand hygiene practices. This residence hall was considered to have no connections, since it was not selected using social network data. This point in <xref rid="F3" ref-type="fig">Figure 3</xref> illustrates that intervention groups selected via community detection may be more useful in this theoretical example because they could identify groups with either higher suboptimal hand hygiene prevalence and/or groups that are spread throughout the network.</p><p id="P31">No single algorithm would be preferred for all research questions. Consider the following alternative questions: &#x0201c;What is the best way to split the network to prevent influenza transmission between groups?&#x0201d; In this case, Edge-Betweenness may be the most useful, since it identifies edges that link communities underlying the network. As another example, consider: &#x0201c;What is the causal effect of optimal hand hygiene on influenza infection?&#x0201d; The Spinglass algorithm might be the most appropriate because it can potentially divide the network into communities more closely corresponding to the assumptions of inverse probability weights for partial interference. As mentioned above, Infomap could also have been used in this scenario. Walktrap was preferred because it returns alternative community divisions that could be examined, and the algorithm can easily be adjusted in R to incorporate a &#x02018;maximum path length&#x02019;.</p></sec><sec id="S13"><title>Limitations</title><p id="P32">This approach does not explicitly address how tuning parameters could be incorporated into algorithms. However, adjustments to tuning parameters decrease the ease of implementation and automation of algorithms, which are desirable features for most analyses.<sup><xref rid="R23" ref-type="bibr">23</xref></sup> One alternative way to customize algorithms results is through dendrograms, which allow researchers to choose community structures other than the structure automatically chosen by R. This paper can provide a useful overview of the algorithms and guidance on their application but should not be considered a sufficient resource to learn the intricacies of community detection algorithms. Finally, the analyses did not demonstrate that the QA approach will necessarily lead to better outcomes for a given study; rather, analyses showed that using the QA approach can help researchers obtain the best community structure to answer their research question.</p></sec><sec id="S14"><title>Conclusions</title><p id="P33">Community detection is an underutilized method that could have substantial benefits for public health research and developing disease prevention interventions in a network context. Previous work has suggested that researchers align their research question and community detection algorithm choice. This work fills an important gap by operationalizing this suggestion in the form of the Question-Alignment approach. Future research should further refine and specify the QA approach, and use the QA approach to help select community detection algorithms when possible.</p></sec><sec sec-type="supplementary-material" id="SM1"><title>Supplementary Material</title><supplementary-material content-type="local-data" id="SD1"><label>Appendix</label><media xlink:href="NIHMS1588673-supplement-Appendix.pdf" orientation="portrait" id="d39e571" position="anchor"/></supplementary-material></sec></body><back><ack id="S15"><title>Acknowledgements</title><p id="P34">The research presented in this paper is that of the authors and does not reflect official policy of the NIH.</p><p id="P35">NRS and PNZ received training support from the National Institutes of Health (T32 HD091058, PI: Aiello). NRS, PNZ, and AEA received general support from the National Institutes of Health (P2C HD050924, PI: Frankenberg). The eX-FLU study was funded by the Centers for Disease Control and Prevention grant U01CK000185 (AEA). LF was supported by the National Heart, Lung, And Blood Institute of the National Institutes of Health (K01HL138159).</p></ack><fn-group><fn id="FN1"><p id="P36">Author roles were as follows: NRS conceptualized the approach, ran all analyses, created data visualizations, drafted the initial manuscript, and oversaw all aspects of the work. PNZ provided essential feedback on method development and data visualization throughout the work and drafted detailed mathematical overviews of each algorithm. JM provided expert guidance on the approach and data visualization. LF and AEA provided critical input on writing and interpretation of results. AEA conceptualized, designed, and oversaw the eX-FLU study. All authors provided critical feedback on manuscript drafts and approved the final manuscript.</p></fn><fn id="FN2"><p id="P37">Financial disclosure: The authors have no financial disclosures.</p></fn></fn-group><ref-list><title>References</title><ref id="R1"><label>1.</label><mixed-citation publication-type="journal"><name><surname>Smith</surname><given-names>KP</given-names></name>, <name><surname>Christakis</surname><given-names>NA</given-names></name>. <article-title>Social networks and health</article-title>. <source>Annu Rev Sociol</source>. <year>2008</year>;<volume>34</volume>:<fpage>405</fpage>&#x02013;<lpage>429</lpage>.</mixed-citation></ref><ref id="R2"><label>2.</label><mixed-citation publication-type="book"><name><surname>Valente</surname><given-names>TW</given-names></name>. <source>Social networks and health: Models, methods, and applications</source>. <publisher-name>Oxford University Press</publisher-name>; <year>2010</year>.</mixed-citation></ref><ref id="R3"><label>3.</label><mixed-citation publication-type="book"><name><surname>Heaney</surname><given-names>CA</given-names></name>, <name><surname>Israel</surname><given-names>BA</given-names></name>. <chapter-title>Social networks and social support</chapter-title> In: <name><surname>Glanz</surname><given-names>K</given-names></name>, <name><surname>Rimer</surname><given-names>BK</given-names></name>, <name><surname>Viswanath</surname><given-names>K</given-names></name>, eds. <source>Health Behavior and Health Education: Theory, research, and practice</source>. Vol <volume>4</volume>
<publisher-loc>San Francisco, CA, US</publisher-loc>: <publisher-name>Jossey-Bass</publisher-name>; <year>2008</year>:<fpage>189</fpage>&#x02013;<lpage>210</lpage>.</mixed-citation></ref><ref id="R4"><label>4.</label><mixed-citation publication-type="journal"><name><surname>Hunter</surname><given-names>RF</given-names></name>, <name><surname>de la Haye</surname><given-names>K</given-names></name>, <name><surname>Badham</surname><given-names>J</given-names></name>, <name><surname>Valente</surname><given-names>T</given-names></name>, <name><surname>Clarke</surname><given-names>M</given-names></name>, <name><surname>Kee</surname><given-names>F</given-names></name>. <article-title>Social network interventions for health behaviour change: a systematic review</article-title>. <source>The Lancet</source>. <year>2017</year>;<volume>390</volume>:<fpage>S47</fpage>.</mixed-citation></ref><ref id="R5"><label>5.</label><mixed-citation publication-type="journal"><name><surname>Valente</surname><given-names>TW</given-names></name>. <article-title>Network interventions</article-title>. <source>Science</source>. <year>2012</year>;<volume>337</volume>(<issue>6090</issue>):<fpage>49</fpage>&#x02013;<lpage>53</lpage>.<pub-id pub-id-type="pmid">22767921</pub-id></mixed-citation></ref><ref id="R6"><label>6.</label><mixed-citation publication-type="journal"><name><surname>Valente</surname><given-names>TW</given-names></name>, <name><surname>Palinkas</surname><given-names>LA</given-names></name>, <name><surname>Czaja</surname><given-names>S</given-names></name>, <name><surname>Chu</surname><given-names>K-H</given-names></name>, <name><surname>Brown</surname><given-names>CH</given-names></name>. <article-title>Social Network Analysis for Program Implementation</article-title>. <source>PLoS One</source>. <year>2015</year>;<volume>10</volume>(<issue>6</issue>):<fpage>e0131712</fpage>.<pub-id pub-id-type="pmid">26110842</pub-id></mixed-citation></ref><ref id="R7"><label>7.</label><mixed-citation publication-type="journal"><name><surname>Hawe</surname><given-names>P</given-names></name>, <name><surname>Webster</surname><given-names>C</given-names></name>, <name><surname>Shiell</surname><given-names>A</given-names></name>. <article-title>A glossary of terms for navigating the field of social network analysis</article-title>. <source>Journal of Epidemiology &#x00026; Community Health</source>. <year>2004</year>;<volume>58</volume>(<issue>12</issue>):<fpage>971</fpage>&#x02013;<lpage>975</lpage>.<pub-id pub-id-type="pmid">15547054</pub-id></mixed-citation></ref><ref id="R8"><label>8.</label><mixed-citation publication-type="journal"><name><surname>Cl&#x000e9;men&#x000e7;on</surname><given-names>S</given-names></name>, <name><surname>De Arazoza</surname><given-names>H</given-names></name>, <name><surname>Rossi</surname><given-names>F</given-names></name>, <name><surname>Tran</surname><given-names>VC</given-names></name>. <article-title>A statistical network analysis of the HIV/AIDS epidemics in Cuba</article-title>. <source>Social Network Analysis and Mining</source>. <year>2015</year>;<volume>5</volume>(<issue>1</issue>):<fpage>58</fpage>.</mixed-citation></ref><ref id="R9"><label>9.</label><mixed-citation publication-type="journal"><name><surname>Shakya</surname><given-names>HB</given-names></name>, <name><surname>Christakis</surname><given-names>NA</given-names></name>, <name><surname>Fowler</surname><given-names>JH</given-names></name>. <article-title>Association between social network communities and health behavior: an observational sociocentric network study of latrine ownership in rural India</article-title>. <source>Am J Public Health</source>. <year>2014</year>;<volume>104</volume>(<issue>5</issue>):<fpage>930</fpage>&#x02013;<lpage>937</lpage>.<pub-id pub-id-type="pmid">24625175</pub-id></mixed-citation></ref><ref id="R10"><label>10.</label><mixed-citation publication-type="journal"><name><surname>Cobb</surname><given-names>NK</given-names></name>, <name><surname>Graham</surname><given-names>AL</given-names></name>, <name><surname>Abrams</surname><given-names>DB</given-names></name>. <article-title>Social network structure of a large online community for smoking cessation</article-title>. <source>Am J Public Health</source>. <year>2010</year>;<volume>100</volume>(<issue>7</issue>):<fpage>1282</fpage>&#x02013;<lpage>1289</lpage>.<pub-id pub-id-type="pmid">20466971</pub-id></mixed-citation></ref><ref id="R11"><label>11.</label><mixed-citation publication-type="journal"><name><surname>Barnett</surname><given-names>NP</given-names></name>, <name><surname>Ott</surname><given-names>MQ</given-names></name>, <name><surname>Rogers</surname><given-names>ML</given-names></name>, <name><surname>Loxley</surname><given-names>M</given-names></name>, <name><surname>Linkletter</surname><given-names>C</given-names></name>, <name><surname>Clark</surname><given-names>MA</given-names></name>. <article-title>Peer associations for substance use and exercise in a college student social network</article-title>. <source>Health Psychol</source>. <year>2014</year>;<volume>33</volume>(<issue>10</issue>):<fpage>1134</fpage>.<pub-id pub-id-type="pmid">24364375</pub-id></mixed-citation></ref><ref id="R12"><label>12.</label><mixed-citation publication-type="journal"><name><surname>Pollack</surname><given-names>CE</given-names></name>, <name><surname>Weissman</surname><given-names>G</given-names></name>, <name><surname>Bekelman</surname><given-names>J</given-names></name>, <name><surname>Liao</surname><given-names>K</given-names></name>, <name><surname>Armstrong</surname><given-names>K</given-names></name>. <article-title>Physician social networks and variation in prostate cancer treatment in three cities</article-title>. <source>Health Serv Res</source>. <year>2012</year>;<volume>47</volume>(<issue>1pt2</issue>):<fpage>380</fpage>&#x02013;<lpage>403</lpage>.<pub-id pub-id-type="pmid">22092259</pub-id></mixed-citation></ref><ref id="R13"><label>13.</label><mixed-citation publication-type="journal"><name><surname>Hu</surname><given-names>Y</given-names></name>, <name><surname>Wang</surname><given-names>F</given-names></name>, <name><surname>Xierali</surname><given-names>IM</given-names></name>. <article-title>Automated Delineation of Hospital Service Areas and Hospital Referral Regions by Modularity Optimization</article-title>. <source>Health Serv Res</source>. <year>2018</year>;<volume>53</volume>(<issue>1</issue>):<fpage>236</fpage>&#x02013;<lpage>255</lpage>.<pub-id pub-id-type="pmid">27861822</pub-id></mixed-citation></ref><ref id="R14"><label>14.</label><mixed-citation publication-type="journal"><name><surname>Fortunato</surname><given-names>S</given-names></name>, <name><surname>Hric</surname><given-names>D</given-names></name>. <article-title>Community detection in networks: A user guide</article-title>. <source>Phys Rep</source>. <year>2016</year>;<volume>659</volume>:<fpage>1</fpage>&#x02013;<lpage>44</lpage>.</mixed-citation></ref><ref id="R15"><label>15.</label><mixed-citation publication-type="journal"><name><surname>Fortunato</surname><given-names>S</given-names></name>
<article-title>Community detection in graphs</article-title>. <source>Phys Rep</source>. <year>2010</year>;<volume>486</volume>(<issue>3</issue>):<fpage>75</fpage>&#x02013;<lpage>174</lpage>.</mixed-citation></ref><ref id="R16"><label>16.</label><mixed-citation publication-type="journal"><name><surname>Newman</surname><given-names>ME</given-names></name>. <article-title>Modularity and community structure in networks</article-title>. <source>Proc Natl Acad Sci U S A</source>. <year>2006</year>;<volume>103</volume>(<issue>23</issue>):<fpage>8577</fpage>&#x02013;<lpage>8582</lpage>.<pub-id pub-id-type="pmid">16723398</pub-id></mixed-citation></ref><ref id="R17"><label>17.</label><mixed-citation publication-type="journal"><name><surname>Shelton</surname><given-names>RC</given-names></name>, <name><surname>Lee</surname><given-names>M</given-names></name>, <name><surname>Brotzman</surname><given-names>LE</given-names></name>, <etal/>
<article-title>Use of social network analysis in the development, dissemination, implementation, and sustainability of health behavior interventions for adults: A systematic review</article-title>. <source>Soc Sci Med</source>. <year>2019</year>;<volume>220</volume>:<fpage>81</fpage>&#x02013;<lpage>101</lpage>.<pub-id pub-id-type="pmid">30412922</pub-id></mixed-citation></ref><ref id="R18"><label>18.</label><mixed-citation publication-type="journal"><name><surname>Yang</surname><given-names>Z</given-names></name>, <name><surname>Algesheimer</surname><given-names>R</given-names></name>, <name><surname>Tessone</surname><given-names>CJ</given-names></name>. <article-title>A comparative analysis of community detection algorithms on artificial networks</article-title>. <source>Sci Rep</source>. <year>2016</year>;<volume>6</volume>:<fpage>30750</fpage>.<pub-id pub-id-type="pmid">27476470</pub-id></mixed-citation></ref><ref id="R19"><label>19.</label><mixed-citation publication-type="journal"><name><surname>Sumner</surname><given-names>KM</given-names></name>, <name><surname>McCabe</surname><given-names>CM</given-names></name>, <name><surname>Nunn</surname><given-names>CL</given-names></name>. <article-title>Network size, structure, and pathogen transmission: a simulation study comparing different community detection algorithms</article-title>. <source>Behaviour</source>. <year>2018</year>;<volume>155</volume>(<issue>7-9</issue>):<fpage>639</fpage>&#x02013;<lpage>670</lpage>.</mixed-citation></ref><ref id="R20"><label>20.</label><mixed-citation publication-type="journal"><name><surname>Lancichinetti</surname><given-names>A</given-names></name>, <name><surname>Fortunato</surname><given-names>S</given-names></name>. <article-title>Community detection algorithms: A comparative analysis</article-title>. <source>Physical Review E</source>. <year>2009</year>;<volume>80</volume>(<issue>5</issue>):<fpage>056117</fpage>.</mixed-citation></ref><ref id="R21"><label>21.</label><mixed-citation publication-type="book"><name><surname>Orman</surname><given-names>GK</given-names></name>, <name><surname>Labatut</surname><given-names>V</given-names></name>. <chapter-title>A Comparison of Community Detection Algorithms on Artificial Networks</chapter-title>
<source>Paper presented at: Discovery Science; 2009</source>//, <year>2009</year>; <publisher-loc>Berlin, Heidelberg</publisher-loc>.</mixed-citation></ref><ref id="R22"><label>22.</label><mixed-citation publication-type="journal"><name><surname>Peel</surname><given-names>L</given-names></name>, <name><surname>Larremore</surname><given-names>DB</given-names></name>, <name><surname>Clauset</surname><given-names>A</given-names></name>. <article-title>The ground truth about metadata and community detection in networks</article-title>. <source>Science Advances</source>. <year>2017</year>;<volume>3</volume>(<issue>5</issue>):<fpage>e1602548</fpage>.<pub-id pub-id-type="pmid">28508065</pub-id></mixed-citation></ref><ref id="R23"><label>23.</label><mixed-citation publication-type="journal"><name><surname>Dao</surname><given-names>V-L</given-names></name>, <name><surname>Bothorel</surname><given-names>C</given-names></name>, <name><surname>Lenca</surname><given-names>P</given-names></name>. <source>Community structure: A comparative evaluation of community detection methods</source>. <year>2018</year>.</mixed-citation></ref><ref id="R24"><label>24.</label><mixed-citation publication-type="journal"><name><surname>Porter</surname><given-names>MA</given-names></name>, <name><surname>Onnela</surname><given-names>J-P</given-names></name>, <name><surname>Mucha</surname><given-names>PJ</given-names></name>. <article-title>Communities in networks</article-title>. <source>Notices of the AMS</source>. <year>2009</year>;<volume>56</volume>(<issue>9</issue>):<fpage>1082</fpage>&#x02013;<lpage>1097</lpage>.</mixed-citation></ref><ref id="R25"><label>25.</label><mixed-citation publication-type="book"><name><surname>Newman</surname><given-names>MEJ</given-names></name>. <source>Networks : an introduction</source>. <publisher-loc>Oxford</publisher-loc> : <publisher-name>Oxford University Press</publisher-name>, 2010.; <year>2010</year>.</mixed-citation></ref><ref id="R26"><label>26.</label><mixed-citation publication-type="journal"><name><surname>Csardi</surname><given-names>G</given-names></name>, <name><surname>Nepusz</surname><given-names>T</given-names></name>. <source>R igraph manual pages</source>. 2015; <comment><ext-link ext-link-type="uri" xlink:href="http://igraph.org/r/doc/">http://igraph.org/r/doc/</ext-link></comment>, <year>2018</year>.</mixed-citation></ref><ref id="R27"><label>27.</label><mixed-citation publication-type="journal"><name><surname>Girvan</surname><given-names>M</given-names></name>, <name><surname>Newman</surname><given-names>ME</given-names></name>. <article-title>Community structure in social and biological networks</article-title>. <source>Proceedings of the national academy of sciences</source>. <year>2002</year>;<volume>99</volume>(<issue>12</issue>):<fpage>7821</fpage>&#x02013;<lpage>7826</lpage>.</mixed-citation></ref><ref id="R28"><label>28.</label><mixed-citation publication-type="journal"><name><surname>Pons</surname><given-names>P</given-names></name>, <name><surname>Latapy</surname><given-names>M</given-names></name>. <article-title>Computing communities in large networks using random walks</article-title>. <source>J Graph Algorithms Appl</source>. <year>2006</year>;<volume>10</volume>(<issue>2</issue>):<fpage>191</fpage>&#x02013;<lpage>218</lpage>.</mixed-citation></ref><ref id="R29"><label>29.</label><mixed-citation publication-type="journal"><name><surname>Raghavan</surname><given-names>UN</given-names></name>, <name><surname>Albert</surname><given-names>R</given-names></name>, <name><surname>Kumara</surname><given-names>S</given-names></name>. <article-title>Near linear time algorithm to detect community structures in large-scale networks</article-title>. <source>Physical review E</source>. <year>2007</year>;<volume>76</volume>(<issue>3</issue>):<fpage>036106</fpage>.</mixed-citation></ref><ref id="R30"><label>30.</label><mixed-citation publication-type="journal"><name><surname>Rosvall</surname><given-names>M</given-names></name>, <name><surname>Bergstrom</surname><given-names>CT</given-names></name>. <article-title>Maps of random walks on complex networks reveal community structure</article-title>. <source>Proceedings of the National Academy of Sciences</source>. <year>2008</year>;<volume>105</volume>(<issue>4</issue>):<fpage>1118</fpage>&#x02013;<lpage>1123</lpage>.</mixed-citation></ref><ref id="R31"><label>31.</label><mixed-citation publication-type="journal"><name><surname>Blondel</surname><given-names>VD</given-names></name>, <name><surname>Guillaume</surname><given-names>J-L</given-names></name>, <name><surname>Lambiotte</surname><given-names>R</given-names></name>, <name><surname>Lefebvre</surname><given-names>E</given-names></name>. <article-title>Fast unfolding of communities in large networks</article-title>. <source>Journal of statistical mechanics: theory and experiment</source>. <year>2008</year>;<volume>2008</volume>(<issue>10</issue>):<fpage>P10008</fpage>.</mixed-citation></ref><ref id="R32"><label>32.</label><mixed-citation publication-type="journal"><name><surname>Reichardt</surname><given-names>J</given-names></name>, <name><surname>Bornholdt</surname><given-names>S</given-names></name>. <article-title>Statistical mechanics of community detection</article-title>. <source>Physical Review E</source>. <year>2006</year>;<volume>74</volume>(<issue>1</issue>):<fpage>016110</fpage>.</mixed-citation></ref><ref id="R33"><label>33.</label><mixed-citation publication-type="journal"><name><surname>Gates</surname><given-names>KM</given-names></name>, <name><surname>Fisher</surname><given-names>ZF</given-names></name>, <name><surname>Arizmendi</surname><given-names>C</given-names></name>, <name><surname>Henry</surname><given-names>TR</given-names></name>, <name><surname>Duffy</surname><given-names>KA</given-names></name>, <name><surname>Mucha</surname><given-names>PJ</given-names></name>. <article-title>Assessing the robustness of cluster solutions obtained from sparse count matrices</article-title>. <source>Psychol Methods</source>. <year>2019</year>;<volume>24</volume>(<issue>6</issue>):<fpage>675</fpage>&#x02013;<lpage>689</lpage>.<pub-id pub-id-type="pmid">30742473</pub-id></mixed-citation></ref><ref id="R34"><label>34.</label><mixed-citation publication-type="journal"><name><surname>Dahlin</surname><given-names>J</given-names></name>, <name><surname>Svenson</surname><given-names>P</given-names></name>. <article-title>Ensemble approaches for improving community detection methods</article-title>. <source>arXiv preprint arXiv</source>:<fpage>13090242</fpage>
<year>2013</year>.</mixed-citation></ref><ref id="R35"><label>35.</label><mixed-citation publication-type="journal"><name><surname>Evans</surname><given-names>CR</given-names></name>, <name><surname>Onnela</surname><given-names>JP</given-names></name>, <name><surname>Williams</surname><given-names>DR</given-names></name>, <name><surname>Subramanian</surname><given-names>SV</given-names></name>. <article-title>Multiple contexts and adolescent body mass index: Schools, neighborhoods, and social networks</article-title>. <source>Social science &#x00026; medicine (1982)</source>. <year>2016</year>;<volume>162</volume>:<fpage>21</fpage>&#x02013;<lpage>31</lpage>.<pub-id pub-id-type="pmid">27322912</pub-id></mixed-citation></ref><ref id="R36"><label>36.</label><mixed-citation publication-type="journal"><name><surname>Hudgens</surname><given-names>MG</given-names></name>, <name><surname>Halloran</surname><given-names>ME</given-names></name>. <article-title>Toward Causal Inference With Interference</article-title>. <source>J Am Stat Assoc</source>. <year>2008</year>;<volume>103</volume>(<issue>482</issue>):<fpage>832</fpage>&#x02013;<lpage>842</lpage>.<pub-id pub-id-type="pmid">19081744</pub-id></mixed-citation></ref><ref id="R37"><label>37.</label><mixed-citation publication-type="journal"><name><surname>Perez-Heydrich</surname><given-names>C</given-names></name>, <name><surname>Hudgens</surname><given-names>MG</given-names></name>, <name><surname>Halloran</surname><given-names>ME</given-names></name>, <name><surname>Clemens</surname><given-names>JD</given-names></name>, <name><surname>Ali</surname><given-names>M</given-names></name>, <name><surname>Emch</surname><given-names>ME</given-names></name>. <article-title>Assessing effects of cholera vaccination in the presence of interference</article-title>. <source>Biometrics</source>. <year>2014</year>;<volume>70</volume>(<issue>3</issue>):<fpage>731</fpage>&#x02013;<lpage>744</lpage>.<pub-id pub-id-type="pmid">24845800</pub-id></mixed-citation></ref><ref id="R38"><label>38.</label><mixed-citation publication-type="journal"><name><surname>Aiello</surname><given-names>AE</given-names></name>, <name><surname>Simanek</surname><given-names>AM</given-names></name>, <name><surname>Eisenberg</surname><given-names>MC</given-names></name>, <etal/>
<article-title>Design and methods of a social network isolation study for reducing respiratory infection transmission: The eX-FLU cluster randomized trial</article-title>. <source>Epidemics</source>. <year>2016</year>;<volume>15</volume>:<fpage>38</fpage>&#x02013;<lpage>55</lpage>.<pub-id pub-id-type="pmid">27266848</pub-id></mixed-citation></ref><ref id="R39"><label>39.</label><mixed-citation publication-type="journal"><name><surname>Gould</surname><given-names>DJ</given-names></name>, <name><surname>Moralejo</surname><given-names>D</given-names></name>, <name><surname>Drey</surname><given-names>N</given-names></name>, <name><surname>Chudleigh</surname><given-names>JH</given-names></name>, <name><surname>Taljaard</surname><given-names>M</given-names></name>. <article-title>Interventions to improve hand hygiene compliance in patient care</article-title>. <source>Cochrane Database Syst Rev</source>. <year>2017</year>;<volume>9</volume>:<fpage>Cd005186</fpage>.<pub-id pub-id-type="pmid">28862335</pub-id></mixed-citation></ref><ref id="R40"><label>40.</label><mixed-citation publication-type="journal"><name><surname>Luangasanatip</surname><given-names>N</given-names></name>, <name><surname>Hongsuwan</surname><given-names>M</given-names></name>, <name><surname>Limmathurotsakul</surname><given-names>D</given-names></name>, <etal/>
<article-title>Comparative efficacy of interventions to promote hand hygiene in hospital: systematic review and network meta-analysis</article-title>. <source>BMJ : British Medical Journal</source>. <year>2015</year>;<volume>351</volume>:<fpage>h3728</fpage>.<pub-id pub-id-type="pmid">26220070</pub-id></mixed-citation></ref><ref id="R41"><label>41.</label><mixed-citation publication-type="journal"><name><surname>Hubert</surname><given-names>L</given-names></name>, <name><surname>Arabie</surname><given-names>P</given-names></name>. <article-title>Comparing partitions</article-title>. <source>Journal of Classification</source>. <year>1985</year>;<volume>2</volume>(<issue>1</issue>):<fpage>193</fpage>&#x02013;<lpage>218</lpage>.</mixed-citation></ref><ref id="R42"><label>42.</label><mixed-citation publication-type="journal"><name><surname>Moody</surname><given-names>J</given-names></name>
<article-title>Peer influence groups: identifying dense clusters in large networks</article-title>. <source>Social Networks</source>. <year>2001</year>;<volume>23</volume>(<issue>4</issue>):<fpage>261</fpage>&#x02013;<lpage>283</lpage>.</mixed-citation></ref><ref id="R43"><label>43.</label><mixed-citation publication-type="journal"><name><surname>Morey</surname><given-names>LC</given-names></name>, <name><surname>Agresti</surname><given-names>A</given-names></name>. <article-title>The Measurement of Classification Agreement: An Adjustment to the Rand Statistic for Chance Agreement</article-title>. <source>Educ Psychol Meas</source>. <year>1984</year>;<volume>44</volume>(<issue>1</issue>):<fpage>33</fpage>&#x02013;<lpage>37</lpage>.</mixed-citation></ref><ref id="R44"><label>44.</label><mixed-citation publication-type="journal"><collab>National Center for Emerging and Zoonotic Infectious Diseases</collab>. <source>Wash Your Hands</source>. <year>2019</year>; <comment><ext-link ext-link-type="uri" xlink:href="https://www.cdc.gov/features/handwashing/index.html">https://www.cdc.gov/features/handwashing/index.html</ext-link>.</comment></mixed-citation></ref><ref id="R45"><label>45.</label><mixed-citation publication-type="journal"><name><surname>Arenas</surname><given-names>A</given-names></name>, <name><surname>Fernandez</surname><given-names>A</given-names></name>, <name><surname>Gomez</surname><given-names>S</given-names></name>. <article-title>Analysis of the structure of complex networks at different resolution levels</article-title>. <source>New journal of physics</source>. <year>2008</year>;<volume>10</volume>(<issue>5</issue>):<fpage>053039</fpage>.</mixed-citation></ref></ref-list></back><floats-group><fig id="F1" orientation="portrait" position="float"><label>Figure 1:</label><caption><p id="P38">Dendrogram displaying Walktrap results</p><p id="P39">Figure notes: Walktrap is an agglomerative algorithm, meaning that each individual node begins as its own community (blue line) and the algorithm ends when all nodes have been merged into one community (green line). Dendrograms are a visual display of the iterative grouping of nodes. In each iteration (x-axis) one node/community is combined with another node/community until all nodes are in one community. Chosen structure is denoted by the red line and is the community division with the highest modularity per <italic>igraph</italic> methods.</p></caption><graphic xlink:href="nihms-1588673-f0001"/></fig><fig id="F2" orientation="portrait" position="float"><label>Figure 2:</label><caption><p id="P40">Comparison of community detection results from six algorithms</p><p id="P41">Figure notes: Colored circles are placed around individuals assigned to the same community. Community membership is mutually exclusive. All results are overlaid on the same network graph.</p></caption><graphic xlink:href="nihms-1588673-f0002"/></fig><fig id="F3" orientation="portrait" position="float"><label>Figure 3:</label><caption><p id="P42">Communities classified as high-risk by each algorithm</p><p id="P43">Figure notes: Each community contains at least 5 people, has prevalence of suboptimal hand hygiene that is greater than 80%, and is connected to at least 5 other communities. Selected points are jittered to prevent overlap. Point sizes are scaled by the number of individuals in each community.</p></caption><graphic xlink:href="nihms-1588673-f0003"/></fig><table-wrap id="T1" position="float" orientation="portrait"><label>Table 1:</label><caption><p id="P44">Overview of algorithms</p></caption><table frame="hsides" rules="rows"><colgroup span="1"><col align="left" valign="middle" span="1"/><col align="left" valign="middle" span="1"/><col align="left" valign="middle" span="1"/><col align="left" valign="middle" span="1"/><col align="left" valign="middle" span="1"/><col align="left" valign="middle" span="1"/></colgroup><thead><tr><th align="center" valign="middle" rowspan="1" colspan="1">Method</th><th align="center" valign="middle" rowspan="1" colspan="1">Stochas<break/> tic</th><th align="center" valign="middle" rowspan="1" colspan="1">Both<break/>directed<break/>and<break/>undirecte<break/>d?</th><th align="center" valign="middle" rowspan="1" colspan="1">Able to<break/>incorporate<break/>edge weights<sup><xref rid="TFN2" ref-type="table-fn">a</xref></sup></th><th align="center" valign="middle" rowspan="1" colspan="1">Customization</th><th align="center" valign="middle" rowspan="1" colspan="1">Possible use cases</th></tr></thead><tbody><tr><td align="left" valign="middle" rowspan="1" colspan="1"><italic>Divisive</italic></td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Edge-Betweenne ss<sup><xref rid="R27" ref-type="bibr">27</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">Modify definitions of edges that are likely to link communities</td><td align="center" valign="middle" rowspan="1" colspan="1">Identify bridges between communities to disrupt transmission</td></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1"><italic>Agglomerative</italic></td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Walktrap<sup><xref rid="R28" ref-type="bibr">28</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">Modify allowable length of random walks</td><td align="center" valign="middle" rowspan="1" colspan="1">Transmission between individuals</td></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Label Propagation<sup><xref rid="R29" ref-type="bibr">29</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">Adoption of social norms</td></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1"><italic>Optimization</italic></td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1"/></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Infomap<sup><xref rid="R30" ref-type="bibr">30</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">Spread of information</td></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Louvain<sup><xref rid="R31" ref-type="bibr">31</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1"/><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">Add self-loops to increase number of detected communities<sup><xref rid="TFN3" ref-type="table-fn">b</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">Define communities for use as clustering variables in analyses</td></tr><tr><td align="left" valign="middle" rowspan="1" colspan="1">&#x02003;Spinglass<sup><xref rid="R32" ref-type="bibr">32</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;<sup><xref rid="TFN4" ref-type="table-fn">c</xref></sup></td><td align="center" valign="middle" rowspan="1" colspan="1">&#x02713;</td><td align="center" valign="middle" rowspan="1" colspan="1">Tuning parameter (gamma) weights the importance of edges</td><td align="center" valign="middle" rowspan="1" colspan="1">Define communities for use as clustering variables in analyses</td></tr></tbody></table><table-wrap-foot><fn id="TFN1"><p id="P45">Notes: For all algorithms, igraph will return one community structure. Under algorithms that return dendrograms, is the division with the highest modularity and it is possible to select alternative community structures. In cases of algorithms with specific stopping rules, only one community structure is returned.</p></fn><fn id="TFN2"><label>a</label><p id="P46">If an attribute named &#x02018;weight&#x02019; is present in an igraph object, the algorithm will use this by default and the user should supply NA or NULL depending on the algorithm if they do not wish to use it. Researchers should use caution when using edge weights with the Edge-Betweenness algorithm. The algorithm considers weights to be distances, rather than connection strengths (i.e., higher weight = two nodes are farther apart). However, edge weights are considered connection strengths when calculating modularity to determine the final solution (higher weight = stronger connection).</p></fn><fn id="TFN3"><label>b</label><p id="P47">This is not a feature specific to the Louvain algorithm implementation, but rather an alternative method to the Reichardt-Bornholdt resolution parameter that can be used for modularity-based community detection algorithms.<sup><xref rid="R45" ref-type="bibr">45</xref></sup></p></fn><fn id="TFN4"><label>c</label><p id="P48">While the algorithm itself allows for directed networks, <italic>igraph</italic> implementation only allows for undirected networks.</p></fn></table-wrap-foot></table-wrap></floats-group></article>