<!-- Generated by pkgdown: do not edit by hand --><htmllang="en"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram • AMR (for R)</title><!-- favicons --><linkrel="icon"type="image/png"sizes="16x16"href="../favicon-16x16.png"><linkrel="icon"type="image/png"sizes="32x32"href="../favicon-32x32.png"><linkrel="apple-touch-icon"type="image/png"sizes="180x180"href="../apple-touch-icon.png"><linkrel="apple-touch-icon"type="image/png"sizes="120x120"href="../apple-touch-icon-120x120.png"><linkrel="apple-touch-icon"type="image/png"sizes="76x76"href="../apple-touch-icon-76x76.png"><linkrel="apple-touch-icon"type="image/png"sizes="60x60"href="../apple-touch-icon-60x60.png"><scriptsrc="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><linkhref="../deps/bootstrap-5.3.1/bootstrap.min.css"rel="stylesheet"><scriptsrc="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><linkhref="../deps/Lato-0.4.9/font.css"rel="stylesheet"><linkhref="../deps/Fira_Code-0.4.9/font.css"rel="stylesheet"><linkhref="../deps/font-awesome-6.5.2/css/all.min.css"rel="stylesheet"><linkhref="../deps/font-awesome-6.5.2/css/v4-shims.min.css"rel="stylesheet"><scriptsrc="../deps/headroom-0.11.0/headroom.min.js"></script><scriptsrc="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><scriptsrc="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><scriptsrc="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><scriptsrc="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><scriptsrc="../deps/search-1.0.0/fuse.min.js"></script><scriptsrc="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><scriptsrc="../pkgdown.js"></script><linkhref="../extra.css"rel="stylesheet"><scriptsrc="../extra.js"></script><metaproperty="og:title"content="Generate Traditional, Combination, Syndromic, or WISCA Antibiograms — antibiogram"><metaname="description"content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker et al., Barbieri et al., and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><metaproperty="og:description"content="Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker et al., Barbieri et al., and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki et al., this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports."><metaproperty="og:image"content="https://msberends.github.io/AMR/logo.svg"></head><body>
<buttonclass="nav-link dropdown-toggle"type="button"id="dropdown-how-to"data-bs-toggle="dropdown"aria-expanded="false"aria-haspopup="true"><spanclass="fa fa-question-circle"></span> How to</button>
<ulclass="dropdown-menu"aria-labelledby="dropdown-how-to"><li><aclass="dropdown-item"href="../articles/AMR.html"><spanclass="fa fa-directions"></span> Conduct AMR Analysis</a></li>
<p>Create detailed antibiograms with options for traditional, combination, syndromic, and Bayesian WISCA methods. Based on the approaches of Klinker <em>et al.</em>, Barbieri <em>et al.</em>, and the Bayesian WISCA model (Weighted-Incidence Syndromic Combination Antibiogram) by Bielicki <em>et al.</em>, this function provides flexible output formats including plots and tables, ideal for integration with R Markdown and Quarto reports.</p>
<span> language <spanclass="op">=</span><spanclass="fu"><ahref="translate.html">get_AMR_locale</a></span><spanclass="op">(</span><spanclass="op">)</span>,</span>
<span> info <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/interactive.html"class="external-link">interactive</a></span><spanclass="op">(</span><spanclass="op">)</span></span>
<span> na <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/options.html"class="external-link">getOption</a></span><spanclass="op">(</span><spanclass="st">"knitr.kable.NA"</span>, default <spanclass="op">=</span><spanclass="st">""</span><spanclass="op">)</span>,</span>
<ul><li><p>Bielicki JA <em>et al.</em> (2016). <strong>Selecting appropriate empirical antibiotic regimens for paediatric bloodstream infections: application of a Bayesian decision model to local and pooled antimicrobial resistance surveillance data</strong><em>Journal of Antimicrobial Chemotherapy</em> 71(3); <ahref="https://doi.org/10.1093/jac/dkv397"class="external-link">doi:10.1093/jac/dkv397</a></p></li>
<li><p>Klinker KP <em>et al.</em> (2021). <strong>Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms</strong>. <em>Therapeutic Advances in Infectious Disease</em>, May 5;8:20499361211011373; <ahref="https://doi.org/10.1177/20499361211011373"class="external-link">doi:10.1177/20499361211011373</a></p></li>
<li><p>Barbieri E <em>et al.</em> (2021). <strong>Development of a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) to guide the choice of the empiric antibiotic treatment for urinary tract infection in paediatric patients: a Bayesian approach</strong><em>Antimicrobial Resistance & Infection Control</em> May 1;10(1):74; <ahref="https://doi.org/10.1186/s13756-021-00939-2"class="external-link">doi:10.1186/s13756-021-00939-2</a></p></li>
<li><p><strong>M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition</strong>, 2022, <em>Clinical and Laboratory Standards Institute (CLSI)</em>. <ahref="https://clsi.org/standards/products/microbiology/documents/m39/"class="external-link">https://clsi.org/standards/products/microbiology/documents/m39/</a>.</p></li>
<dd><p>a <ahref="https://rdrr.io/r/base/data.frame.html"class="external-link">data.frame</a> containing at least a column with microorganisms and columns with antibiotic results (class 'sir', see <code><ahref="as.sir.html">as.sir()</a></code>)</p></dd>
<dd><p>vector of any antibiotic name or code (will be evaluated with <code><ahref="as.ab.html">as.ab()</a></code>, column name of <code>x</code>, or (any combinations of) <ahref="antibiotic_class_selectors.html">antibiotic selectors</a> such as <code><ahref="antibiotic_class_selectors.html">aminoglycosides()</a></code> or <code><ahref="antibiotic_class_selectors.html">carbapenems()</a></code>. For combination antibiograms, this can also be set to values separated with <code>"+"</code>, such as "TZP+TOB" or "cipro + genta", given that columns resembling such antibiotics exist in <code>x</code>. See <em>Examples</em>.</p></dd>
<dd><p>a character to transform microorganism input - must be <code>"name"</code>, <code>"shortname"</code> (default), <code>"gramstain"</code>, or one of the column names of the <ahref="microorganisms.html">microorganisms</a> data set: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", or "snomed". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dd><p>a character to transform antibiotic input - must be one of the column names of the <ahref="antibiotics.html">antibiotics</a> data set (defaults to <code>"name"</code>): "ab", "cid", "name", "group", "atc", "atc_group1", "atc_group2", "abbreviations", "synonyms", "oral_ddd", "oral_units", "iv_ddd", "iv_units", or "loinc". Can also be <code>NULL</code> to not transform the input.</p></dd>
<dd><p>a column name of <code>x</code>, or values calculated to split rows of <code>x</code>, e.g. by using <code><ahref="https://rdrr.io/r/base/ifelse.html"class="external-link">ifelse()</a></code> or <code><ahref="https://dplyr.tidyverse.org/reference/case_when.html"class="external-link">case_when()</a></code>. See <em>Examples</em>.</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether total available numbers per pathogen should be added to the table (default is <code>TRUE</code>). This will add the lowest and highest number of available isolate per antibiotic (e.g, if for <em>E. coli</em> 200 isolates are available for ciprofloxacin and 150 for amoxicillin, the returned number will be "150-200").</p></dd>
<dd><p>(for combination antibiograms): a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate that isolates must be tested for all antibiotics, see <em>Details</em></p></dd>
<dd><p>numeric value (1–12) indicating how the 'cells' of the antibiogram table should be formatted. See <em>Details</em>><em>Formatting Type</em> for a list of options.</p></dd>
<dd><p>column name of the names or codes of the microorganisms (see <code><ahref="as.mo.html">as.mo()</a></code>) - the default is the first column of class <code><ahref="as.mo.html">mo</a></code>. Values will be coerced using <code><ahref="as.mo.html">as.mo()</a></code>.</p></dd>
<dd><p>the minimum allowed number of available (tested) isolates. Any isolate count lower than <code>minimum</code> will return <code>NA</code> with a warning. The default number of <code>30</code> isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see <em>Source</em>.</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether all susceptibility should be determined by results of either S, SDD, or I, instead of only S (default is <code>TRUE</code>)</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate info should be printed - the default is <code>TRUE</code> only in interactive mode</p></dd>
<dd><p>when used in <ahref="https://rdrr.io/pkg/knitr/man/kable.html"class="external-link">R Markdown or Quarto</a>: arguments passed on to <code><ahref="https://rdrr.io/pkg/knitr/man/kable.html"class="external-link">knitr::kable()</a></code> (otherwise, has no use)</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether the microorganism names in the <ahref="https://rdrr.io/pkg/knitr/man/kable.html"class="external-link">knitr</a> table should be made italic, using <code><ahref="italicise_taxonomy.html">italicise_taxonomy()</a></code>.</p></dd>
<p><strong>Remember that you should filter your data to let it contain only first isolates!</strong> This is needed to exclude duplicates and to reduce selection bias. Use <code><ahref="first_isolate.html">first_isolate()</a></code> to determine them in your data set with one of the four available algorithms.</p><divclass="section">
<p>The formatting of the 'cells' of the table can be set with the argument <code>formatting_type</code>. In these examples, <code>5</code> is the susceptibility percentage, <code>15</code> the numerator, and <code>300</code> the denominator:</p><ol><li><p>5</p></li>
</ol><p>The default is <code>10</code>, which can be set globally with the package option <code><ahref="AMR-options.html">AMR_antibiogram_formatting_type</a></code>, e.g. <code>options(AMR_antibiogram_formatting_type = 5)</code>.</p>
<p>There are four antibiogram types, as summarised by Klinker <em>et al.</em> (2021, <ahref="https://doi.org/10.1177/20499361211011373"class="external-link">doi:10.1177/20499361211011373</a>
), and they are all supported by <code>antibiogram()</code>. Use WISCA whenever possible, since it provides precise coverage estimates by accounting for pathogen incidence and antimicrobial susceptibility. See the section <em>Why Use WISCA?</em> on this page.</p>
<p>The four antibiogram types:</p><ol><li><p><strong>Traditional Antibiogram</strong></p>
<p>WISCA enhances empirical antibiotic selection by weighting the incidence of pathogens in specific clinical syndromes and combining them with their susceptibility data. It provides an estimation of regimen coverage by aggregating pathogen incidences and susceptibilities across potential causative organisms. See also the section <em>Why Use WISCA?</em> on this page.</p>
<p>Case example: Susceptibility of <em>Pseudomonas aeruginosa</em> to TZP among respiratory specimens (obtained among ICU patients only) for male patients age >=65 years with heart failure</p>
<p>WISCA uses a sophisticated Bayesian decision model to combine both local and pooled antimicrobial resistance data. This approach not only evaluates local patterns but can also draw on multi-centre datasets to improve regimen accuracy, even in low-incidence infections like paediatric bloodstream infections (BSIs).</p></li>
</ol></div>
<divclass="section">
<h3id="inclusion-in-combination-antibiogram-and-syndromic-antibiogram">Inclusion in Combination Antibiogram and Syndromic Antibiogram<aclass="anchor"aria-label="anchor"href="#inclusion-in-combination-antibiogram-and-syndromic-antibiogram"></a></h3>
<p>Note that for types 2 and 3 (Combination Antibiogram and Syndromic Antibiogram), it is important to realise that susceptibility can be calculated in two ways, which can be set with the <code>only_all_tested</code> argument (default is <code>FALSE</code>). See this example for two antibiotics, Drug A and Drug B, about how <code>antibiogram()</code> works to calculate the %SI:</p>
<spanid="cb1-7"><ahref="#cb1-7"tabindex="-1"></a> S or I S or I X X X X</span>
<spanid="cb1-8"><ahref="#cb1-8"tabindex="-1"></a> R S or I X X X X</span>
<spanid="cb1-9"><ahref="#cb1-9"tabindex="-1"></a><spanclass="sc"><</span><spanclass="cn">NA</span><spanclass="sc">></span> S or I X X <spanclass="sc">-</span><spanclass="sc">-</span></span>
<spanid="cb1-10"><ahref="#cb1-10"tabindex="-1"></a> S or I R X X X X</span>
<spanid="cb1-11"><ahref="#cb1-11"tabindex="-1"></a> R R <spanclass="sc">-</span> X <spanclass="sc">-</span> X</span>
<spanid="cb1-12"><ahref="#cb1-12"tabindex="-1"></a><spanclass="sc"><</span><spanclass="cn">NA</span><spanclass="sc">></span> R <spanclass="sc">-</span><spanclass="sc">-</span><spanclass="sc">-</span><spanclass="sc">-</span></span>
<spanid="cb1-13"><ahref="#cb1-13"tabindex="-1"></a> S or I <spanclass="sc"><</span><spanclass="cn">NA</span><spanclass="sc">></span> X X <spanclass="sc">-</span><spanclass="sc">-</span></span>
<spanid="cb1-14"><ahref="#cb1-14"tabindex="-1"></a> R <spanclass="sc"><</span><spanclass="cn">NA</span><spanclass="sc">></span><spanclass="sc">-</span><spanclass="sc">-</span><spanclass="sc">-</span><spanclass="sc">-</span></span>
<p>All types of antibiograms as listed above can be plotted (using <code><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">ggplot2::autoplot()</a></code> or base <spanstyle="R">R</span>'s <code><ahref="plot.html">plot()</a></code> and <code><ahref="https://rdrr.io/r/graphics/barplot.html"class="external-link">barplot()</a></code>).</p>
<p>THe outcome of <code>antibiogram()</code> can also be used directly in R Markdown / Quarto (i.e., <code>knitr</code>) for reports. In this case, <code><ahref="https://rdrr.io/pkg/knitr/man/kable.html"class="external-link">knitr::kable()</a></code> will be applied automatically and microorganism names will even be printed in italics at default (see argument <code>italicise</code>).</p>
<p>You can also use functions from specific 'table reporting' packages to transform the output of <code>antibiogram()</code> to your needs, e.g. with <code>flextable::as_flextable()</code> or <code>gt::gt()</code>.</p>
</div>
</div>
<divclass="section level2">
<h2id="why-use-wisca-">Why Use WISCA?<aclass="anchor"aria-label="anchor"href="#why-use-wisca-"></a></h2>
<p>WISCA is a powerful tool for guiding empirical antibiotic therapy because it provides precise coverage estimates by accounting for pathogen incidence and antimicrobial susceptibility. This is particularly important in empirical treatment, where the causative pathogen is often unknown at the outset. Traditional antibiograms do not reflect the weighted likelihood of specific pathogens based on clinical syndromes, which can lead to suboptimal treatment choices.</p>
<p>The Bayesian WISCA, as described by Bielicki <em>et al.</em> (2016), improves on earlier methods by handling uncertainties common in smaller datasets, such as low-incidence infections. This method offers a significant advantage by:</p><ol><li><p>Pooling Data from Multiple Sources:<br> WISCA uses pooled data from multiple hospitals or surveillance sources to overcome limitations of small sample sizes at individual institutions, allowing for more confident selection of narrow-spectrum antibiotics or combinations.</p></li>
<li><p>Bayesian Framework:<br> The Bayesian decision tree model accounts for both local data and prior knowledge (such as inherent resistance patterns) to estimate regimen coverage. It allows for a more precise estimation of coverage, even in cases where susceptibility data is missing or incomplete.</p></li>
<li><p>Incorporating Pathogen and Regimen Uncertainty:<br> WISCA allows clinicians to see the likelihood that an empirical regimen will be effective against all relevant pathogens, taking into account uncertainties related to both pathogen prevalence and antimicrobial resistance. This leads to better-informed, data-driven clinical decisions.</p></li>
<li><p>Scenarios for Optimising Treatment:<br> For hospitals or settings with low-incidence infections, WISCA helps determine whether local data is sufficient or if pooling with external data is necessary. It also identifies statistically significant differences or similarities between antibiotic regimens, enabling clinicians to choose optimal therapies with greater confidence.</p></li>
</ol><p>WISCA is essential in optimising empirical treatment by shifting away from broad-spectrum antibiotics, which are often overused in empirical settings. By offering precise estimates based on syndromic patterns and pooled data, WISCA supports antimicrobial stewardship by guiding more targeted therapy, reducing unnecessary broad-spectrum use, and combating the rise of antimicrobial resistance.</p>
<divclass="sourceCode"><preclass="sourceCode r"><code><spanclass="r-in"><span><spanclass="co"># example_isolates is a data set available in the AMR package.</span></span></span>
<spanclass="r-in"><span><spanclass="co"># run ?example_isolates for more info.</span></span></span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 1</span> 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 2</span> 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 3</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 4</span> 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 5</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 6</span> 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 7</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 8</span> 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;"> 9</span> 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA </span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">10</span> 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA </span>
<spanclass="r-in"><span> minimum <spanclass="op">=</span><spanclass="fl">10</span>, <spanclass="co"># this should be >=30, but now just as example</span></span></span>
<p><code>AMR</code> (for R). Free and open-source, licenced under the <atarget="_blank"href="https://github.com/msberends/AMR/blob/main/LICENSE"class="external-link">GNU General Public License version 2.0 (GPL-2)</a>.<br>Developed at the <atarget="_blank"href="https://www.rug.nl"class="external-link">University of Groningen</a> and <atarget="_blank"href="https://www.umcg.nl"class="external-link">University Medical Center Groningen</a> in The Netherlands.</p>