1
0
mirror of https://github.com/msberends/AMR.git synced 2026-06-24 06:16:24 +02:00

Built site for AMR@3.0.1.9061: 0c1709c

This commit is contained in:
github-actions
2026-06-23 18:00:14 +00:00
parent 9447e0f2c2
commit 2a7bfb9ffb
328 changed files with 5357 additions and 3687 deletions

View File

@@ -12,8 +12,8 @@
<link rel="icon" sizes="any" href="../favicon.ico">
<link rel="manifest" href="../site.webmanifest">
<script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet">
<link href="../deps/bootstrap-5.3.8/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.3.8/bootstrap.bundle.min.js"></script><link href="../deps/Lato-0.4.10/font.css" rel="stylesheet">
<link href="../deps/Fira_Code-0.4.10/font.css" rel="stylesheet">
<link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet">
<link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet">
@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9057</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9061</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -87,89 +87,98 @@
<blockquote>
<p>This explainer was largely written by our <a href="https://chat.amr-for-r.org" class="external-link">AMR for R Assistant</a>, a ChatGPT
manually-trained model able to answer any question about the
<code>AMR</code> package.</p>
</blockquote>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
<h2 id="why-wisca">Why WISCA?<a class="anchor" aria-label="anchor" href="#why-wisca"></a>
</h2>
<p>Clinical guidelines for empirical antimicrobial therapy require
<em>probabilistic reasoning</em>: what is the chance that a regimen will
cover the likely infecting organisms, before culture results are
available?</p>
<p>This is the purpose of <strong>WISCA</strong>, or
<strong>Weighted-Incidence Syndromic Combination
Antibiogram</strong>.</p>
<p>WISCA is a Bayesian approach that integrates:</p>
<p>When a clinician starts empirical antimicrobial therapy, the
causative pathogen is unknown. The question they need answered is not
<em>“what proportion of</em> E. coli <em>is susceptible to
ciprofloxacin?“</em> but rather <em>“what is the probability that this
regimen will adequately cover whatever pathogen turns out to be causing
my patients infection?”</em></p>
<p>The traditional cumulative antibiogram, as standardised by CLSI M39,
cannot answer that question. It presents susceptibility percentages per
species per antibiotic, but:</p>
<ul>
<li>
<strong>Pathogen prevalence</strong> (how often each species causes
the syndrome),</li>
<strong>It fragments information by organism.</strong> The clinician
must mentally combine susceptibility rates across multiple species,
weighting by how often each species causes the syndrome, a calculation
nobody does at the bedside.</li>
<li>
<strong>Regimen susceptibility</strong> (how often a regimen works
<em>if</em> the pathogen is known),</li>
<strong>It ignores pathogen incidence.</strong> A species that
causes 2% of infections is given the same visual weight as one that
causes 60%.</li>
<li>
<strong>It does not evaluate combination regimens.</strong> Much
empirical therapy consists of two or more agents, but the traditional
antibiogram only shows monotherapy per organism.</li>
<li>
<strong>It provides no measure of uncertainty.</strong> A reported
“90% susceptible” based on 50 isolates has a 95% confidence interval of
roughly 78-97% (Clopper-Pearson), yet the antibiogram presents it as a
point estimate without context.</li>
</ul>
<p>to estimate the <strong>overall empirical coverage</strong> of
antimicrobial regimens, with quantified uncertainty.</p>
<p>This vignette explains how WISCA works, why it is useful, and how to
apply it using the <code>AMR</code> package.</p>
<p><strong>WISCA</strong> (Weighted-Incidence Syndromic Combination
Antibiogram) resolves all four limitations. It estimates the probability
that a regimen will provide adequate empirical coverage for a given
infection syndrome, weighted by local pathogen incidence, with full
uncertainty quantification via Bayesian inference.</p>
<p>The concept was introduced by Hebert <em>et al.</em> (2012), who
demonstrated that traditional antibiogram susceptibility rates could be
misleading: ciprofloxacin appeared 84% effective against <em>E.
coli</em> in the traditional antibiogram, but WISCA revealed only 62%
coverage for UTI and 37% for abdominal infections, because enterococci
(intrinsically resistant) and other species contribute substantially to
these syndromes. Randhawa <em>et al.</em> (2014) showed that
WISCA-guided regimen selection could improve time-to-adequate-coverage
on the ICU by over 40%. Bielicki <em>et al.</em> (2016) introduced the
Bayesian framework now used in this package, enabling credible intervals
and multi-centre pooling. Cook <em>et al.</em> (2022) applied it
globally across 52 hospitals in 23 countries.</p>
</div>
<div class="section level2">
<h2 id="why-traditional-antibiograms-fall-short">Why traditional antibiograms fall short<a class="anchor" aria-label="anchor" href="#why-traditional-antibiograms-fall-short"></a>
</h2>
<p>A standard antibiogram gives you:</p>
<pre><code>Species → Antibiotic → Susceptibility %</code></pre>
<p>But clinicians dont know the species <em>a priori</em>. They need to
choose a regimen that covers the <strong>likely pathogens</strong>,
without knowing which one is present.</p>
<p>Traditional antibiograms calculate the susceptibility % as just the
number of resistant isolates divided by the total number of tested
isolates. Therefore, traditional antibiograms:</p>
<ul>
<li>Fragment information by organism,</li>
<li>Do not weight by real-world prevalence,</li>
<li>Do not account for combination therapy or sample size,</li>
<li>Do not provide uncertainty.</li>
</ul>
</div>
<div class="section level2">
<h2 id="the-idea-of-wisca">The idea of WISCA<a class="anchor" aria-label="anchor" href="#the-idea-of-wisca"></a>
<h2 id="the-idea">The idea<a class="anchor" aria-label="anchor" href="#the-idea"></a>
</h2>
<p>WISCA asks:</p>
<blockquote>
<p>“What is the <strong>probability</strong> that this regimen
<strong>will cover</strong> the pathogen, given the syndrome?”</p>
</blockquote>
<p>This means combining two things:</p>
<p>This means combining two quantities:</p>
<ul>
<li>
<strong>Incidence</strong> of each pathogen in the syndrome,</li>
<strong>Pathogen incidence</strong> in the syndrome (how often each
species causes it),</li>
<li>
<strong>Susceptibility</strong> of each pathogen to the
regimen.</li>
</ul>
<p>We can write this as:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munder><mo></mo><mi>i</mi></munder><mo stretchy="false" form="prefix">(</mo><msub><mtext mathvariant="normal">Incidence</mtext><mi>i</mi></msub><mo>×</mo><msub><mtext mathvariant="normal">Susceptibility</mtext><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)</annotation></semantics></math></p>
<p>For example, suppose:</p>
<p>For example, suppose in your hospital:</p>
<ul>
<li>
<em>E. coli</em> causes 60% of cases, and 90% of <em>E. coli</em>
are susceptible to a drug.</li>
<em>E. coli</em> causes 60% of UTIs, and 90% of <em>E. coli</em> are
susceptible to a drug.</li>
<li>
<em>Klebsiella</em> causes 40% of cases, and 70% of
<em>Klebsiella</em> causes 40% of UTIs, and 70% of
<em>Klebsiella</em> are susceptible.</li>
</ul>
<p>Then:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>0.6</mn><mo>×</mo><mn>0.9</mn><mo stretchy="false" form="postfix">)</mo><mo>+</mo><mo stretchy="false" form="prefix">(</mo><mn>0.4</mn><mo>×</mo><mn>0.7</mn><mo stretchy="false" form="postfix">)</mo><mo>=</mo><mn>0.82</mn></mrow><annotation encoding="application/x-tex">\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82</annotation></semantics></math></p>
<p>But in real data, incidence and susceptibility are <strong>estimated
from samples</strong>, so they carry uncertainty. WISCA models this
<strong>probabilistically</strong>, using conjugate Bayesian
<p>That 82% is a far more clinically meaningful number than the
species-level “90% of <em>E. coli</em>” and “70% of <em>Klebsiella</em>
reported separately in a traditional antibiogram, because it directly
answers the question the clinician actually faces.</p>
<p>But in real data, both incidence and susceptibility are
<strong>estimated from finite samples</strong>, so they carry
uncertainty. A sample of 50 isolates is not a census. WISCA models this
uncertainty <strong>probabilistically</strong>, using conjugate Bayesian
distributions.</p>
</div>
<div class="section level2">
<h2 id="the-bayesian-engine-behind-wisca">The Bayesian engine behind WISCA<a class="anchor" aria-label="anchor" href="#the-bayesian-engine-behind-wisca"></a>
<h2 id="the-bayesian-engine">The Bayesian engine<a class="anchor" aria-label="anchor" href="#the-bayesian-engine"></a>
</h2>
<div class="section level3">
<h3 id="pathogen-incidence">Pathogen incidence<a class="anchor" aria-label="anchor" href="#pathogen-incidence"></a>
@@ -180,27 +189,38 @@ distributions.</p>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>K</mi><annotation encoding="application/x-tex">K</annotation></semantics></math>
be the number of pathogens,</li>
<li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>α</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi></mi><mo>,</mo><mn>1</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\alpha = (1, 1, \ldots, 1)</annotation></semantics></math>
be a <strong>Dirichlet</strong> prior (uniform),</li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝛂</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi></mi><mo>,</mo><mn>1</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\boldsymbol{\alpha} = (1, 1, \ldots, 1)</annotation></semantics></math>
be a
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mtext mathvariant="normal">Dirichlet</mtext><annotation encoding="application/x-tex">\text{Dirichlet}</annotation></semantics></math>
prior (uniform, non-informative),</li>
<li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">n = (n_1, \ldots, n_K)</annotation></semantics></math>
be the observed counts per species.</li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝐧</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\boldsymbol{n} = (n_1, \ldots, n_K)</annotation></semantics></math>
be the observed isolate counts per species.</li>
</ul>
<p>Then the posterior incidence is:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝐩</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\boldsymbol{p} \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
<p>To simulate from this, we use:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Gamma</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mi>i</mi></msub><mo>+</mo><msub><mi>n</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo stretchy="false" form="postfix">)</mo><mo>,</mo><mspace width="1.0em"></mspace><msub><mi>p</mi><mi>i</mi></msub><mo>=</mo><mfrac><msub><mi>x</mi><mi>i</mi></msub><mrow><munderover><mo></mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>x</mi><mi>j</mi></msub></mrow></mfrac></mrow><annotation encoding="application/x-tex">x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}</annotation></semantics></math></p>
<p>The Dirichlet is the conjugate prior for multinomial data. With the
non-informative prior
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Dirichlet</mtext><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi></mi><mo>,</mo><mn>1</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Dirichlet}(1, 1, \ldots, 1)</annotation></semantics></math>,
the posterior is dominated by the data once sample sizes are reasonable.
With small samples, the posterior is appropriately more diffuse,
reflecting genuine uncertainty, and the resulting credible intervals
will be wider.</p>
</div>
<div class="section level3">
<h3 id="susceptibility">Susceptibility<a class="anchor" aria-label="anchor" href="#susceptibility"></a>
</h3>
<p>Each pathogenregimen pair has a prior and data:</p>
<p>Each pathogen-regimen pair has a prior and observed data:</p>
<ul>
<li>Prior:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>,</mo><msub><mi>β</mi><mn>0</mn></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Beta}(\alpha_0, \beta_0)</annotation></semantics></math>,
with default
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>α</mi><mn>0</mn></msub><mo>=</mo><msub><mi>β</mi><mn>0</mn></msub><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">\alpha_0 = \beta_0 = 1</annotation></semantics></math>
</li>
<li>Default prior:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><mn>0.5</mn><mo>,</mo><mn>0.5</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Beta}(0.5, 0.5)</annotation></semantics></math>
(Jeffreys prior)</li>
<li>Intrinsically resistant pairs:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>9999</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Beta}(1, 9999)</annotation></semantics></math>,
forcing near-zero susceptibility regardless of observed data (based on
EUCAST Expected Resistant Phenotypes)</li>
<li>Data:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>S</mi><annotation encoding="application/x-tex">S</annotation></semantics></math>
susceptible out of
@@ -224,27 +244,76 @@ I (intermediate [CLSI], or susceptible, increased exposure
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝐩</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext></mrow><annotation encoding="application/x-tex">\boldsymbol{p} \sim \text{Dirichlet}</annotation></semantics></math>
</li>
<li>Simulate susceptibility:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo>+</mo><msub><mi>R</mi><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)</annotation></semantics></math>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><msub><mi>N</mi><mi>i</mi></msub><mo></mo><msub><mi>S</mi><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(\alpha_0 + S_i,\ \beta_0 + N_i - S_i)</annotation></semantics></math>
</li>
<li>Combine:</li>
</ol>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munderover><mo></mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>p</mi><mi>i</mi></msub><mo></mo><msub><mi>θ</mi><mi>i</mi></msub></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_{i=1}^{K} p_i \cdot \theta_i</annotation></semantics></math></p>
<p>Repeat this simulation (e.g. 1000×) and summarise:</p>
<p>Repeat this simulation (e.g., 1000 times) and summarise:</p>
<ul>
<li>
<strong>Mean</strong> = expected coverage</li>
<li>
<strong>Quantiles</strong> = credible interval</li>
<strong>Quantiles</strong> = credible interval (95% by default)</li>
</ul>
<p>Because each simulation draws from the full posterior, the resulting
distribution of coverage estimates naturally captures the joint
uncertainty in both pathogen incidence and susceptibility. The credible
interval tells you how confident you can be in the coverage estimate,
something a traditional antibiogram never provides.</p>
</div>
</div>
<div class="section level2">
<h2 id="when-to-use-wisca-vs--traditional-antibiograms">When to use WISCA vs. traditional antibiograms<a class="anchor" aria-label="anchor" href="#when-to-use-wisca-vs--traditional-antibiograms"></a>
</h2>
<table class="table">
<thead><tr class="header">
<th>Goal</th>
<th>Recommended approach</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>Guide empirical therapy decisions</td>
<td><strong>WISCA</strong></td>
</tr>
<tr class="even">
<td>Compare regimens for a syndrome</td>
<td><strong>WISCA</strong></td>
</tr>
<tr class="odd">
<td>Evaluate combination regimens</td>
<td><strong>WISCA</strong></td>
</tr>
<tr class="even">
<td>Antimicrobial stewardship (A-team)</td>
<td><strong>WISCA</strong></td>
</tr>
<tr class="odd">
<td>Track resistance trends per species</td>
<td>Traditional / Combination</td>
</tr>
<tr class="even">
<td>AMR surveillance reporting</td>
<td>Traditional / Syndromic</td>
</tr>
<tr class="odd">
<td>Understand species-level epidemiology</td>
<td>Traditional</td>
</tr>
</tbody>
</table>
<p>In short: if the end goal involves a <em>patient</em> who does not
yet have a culture result, WISCA is the appropriate tool. If the end
goal is <em>surveillance</em> of resistance at the species level, the
traditional antibiogram remains fit for purpose.</p>
</div>
<div class="section level2">
<h2 id="practical-use-in-the-amr-package">Practical use in the <code>AMR</code> package<a class="anchor" aria-label="anchor" href="#practical-use-in-the-amr-package"></a>
</h2>
<div class="section level3">
<h3 id="prepare-data-and-simulate-synthetic-syndrome">Prepare data and simulate synthetic syndrome<a class="anchor" aria-label="anchor" href="#prepare-data-and-simulate-synthetic-syndrome"></a>
<h3 id="prepare-data">Prepare data<a class="anchor" aria-label="anchor" href="#prepare-data"></a>
</h3>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://amr-for-r.org">AMR</a></span><span class="op">)</span></span>
<span><span class="va">data</span> <span class="op">&lt;-</span> <span class="va">example_isolates</span></span>
<span></span>
@@ -271,13 +340,13 @@ I (intermediate [CLSI], or susceptible, increased exposure
<span><span class="co">#&gt; <span style="color: #949494;"># TCY &lt;sir&gt;, TGC &lt;sir&gt;, DOX &lt;sir&gt;, ERY &lt;sir&gt;, CLI &lt;sir&gt;, AZM &lt;sir&gt;,</span></span></span>
<span><span class="co">#&gt; <span style="color: #949494;"># IPM &lt;sir&gt;, MEM &lt;sir&gt;, MTR &lt;sir&gt;, CHL &lt;sir&gt;, COL &lt;sir&gt;, MUP &lt;sir&gt;, …</span></span></span>
<span></span>
<span><span class="co"># Add a fake syndrome column</span></span>
<span><span class="va">data</span><span class="op">$</span><span class="va">syndrome</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">data</span><span class="op">$</span><span class="va">mo</span> <span class="op"><a href="../reference/like.html">%like%</a></span> <span class="st">"coli"</span>, <span class="st">"UTI"</span>, <span class="st">"No UTI"</span><span class="op">)</span></span></code></pre></div>
<span><span class="co"># Add a synthetic syndrome column for demonstration</span></span>
<span><span class="va">data</span><span class="op">$</span><span class="va">syndrome</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="va">data</span><span class="op">$</span><span class="va">mo</span> <span class="op"><a href="../reference/like.html">%like%</a></span> <span class="st">"coli"</span>, <span class="st">"UTI"</span>, <span class="st">"Non-UTI"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level3">
<h3 id="basic-wisca-antibiogram">Basic WISCA antibiogram<a class="anchor" aria-label="anchor" href="#basic-wisca-antibiogram"></a>
<h3 id="basic-wisca">Basic WISCA<a class="anchor" aria-label="anchor" href="#basic-wisca"></a>
</h3>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"CIP"</span>, <span class="st">"GEN"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
@@ -288,16 +357,19 @@ I (intermediate [CLSI], or susceptible, increased exposure
<th align="left">Gentamicin</th>
</tr></thead>
<tbody><tr class="odd">
<td align="left">73.7% (71.7-75.8%)</td>
<td align="left">77% (74.3-79.4%)</td>
<td align="left">72.8% (70.7-74.8%)</td>
<td align="left">74.2% (72.1-76.1%)</td>
<td align="left">78.4% (75.6-81.1%)</td>
<td align="left">72.5% (70.4-74.6%)</td>
</tr></tbody>
</table>
</div>
<div class="section level3">
<h3 id="use-combination-regimens">Use combination regimens<a class="anchor" aria-label="anchor" href="#use-combination-regimens"></a>
</h3>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<p>Combination regimens are specified with a <code>+</code> separator.
WISCA evaluates whether <em>at least one</em> agent in the combination
covers the pathogen:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"AMC + CIP"</span>, <span class="st">"AMC + GEN"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
@@ -313,16 +385,18 @@ I (intermediate [CLSI], or susceptible, increased exposure
<th align="left">Amoxicillin/clavulanic acid + Gentamicin</th>
</tr></thead>
<tbody><tr class="odd">
<td align="left">73.8% (71.8-75.7%)</td>
<td align="left">87.5% (85.9-89%)</td>
<td align="left">89.7% (88.2-91.1%)</td>
<td align="left">74.2% (72.2-76.1%)</td>
<td align="left">88.8% (87.2-90.4%)</td>
<td align="left">90.8% (89.4-92.2%)</td>
</tr></tbody>
</table>
</div>
<div class="section level3">
<h3 id="stratify-by-syndrome">Stratify by syndrome<a class="anchor" aria-label="anchor" href="#stratify-by-syndrome"></a>
</h3>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<p>Use <code>syndromic_group</code> to produce separate WISCA estimates
per clinical stratum. You can pass a column name or any expression:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"AMC + CIP"</span>, <span class="st">"AMC + GEN"</span><span class="op">)</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="st">"syndrome"</span></span>
@@ -342,22 +416,22 @@ I (intermediate [CLSI], or susceptible, increased exposure
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">No UTI</td>
<td align="left">70.1% (67.8-72.3%)</td>
<td align="left">85.2% (83.1-87.2%)</td>
<td align="left">87.1% (85.3-88.7%)</td>
<td align="left">Non-UTI</td>
<td align="left">70.3% (67.9-72.7%)</td>
<td align="left">86.8% (84.9-88.7%)</td>
<td align="left">88.4% (86.4-90.2%)</td>
</tr>
<tr class="even">
<td align="left">UTI</td>
<td align="left">80.9% (77.7-83.8%)</td>
<td align="left">88.2% (85.7-90.5%)</td>
<td align="left">90.9% (88.7-93%)</td>
<td align="left">80.3% (77-83.3%)</td>
<td align="left">88.4% (85.7-90.8%)</td>
<td align="left">91% (88.3-93.3%)</td>
</tr>
</tbody>
</table>
<p>The <code>AMR</code> package is available in 28 languages, which can
all be used for the <code><a href="../reference/antibiogram.html">wisca()</a></code> function too:</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">data</span>,</span>
<span> antimicrobials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"AMC"</span>, <span class="st">"AMC + CIP"</span>, <span class="st">"AMC + GEN"</span><span class="op">)</span>,</span>
<span> syndromic_group <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/grep.html" class="external-link">gsub</a></span><span class="op">(</span><span class="st">"UTI"</span>, <span class="st">"UCI"</span>, <span class="va">data</span><span class="op">$</span><span class="va">syndrome</span><span class="op">)</span>,</span>
@@ -378,20 +452,36 @@ all be used for the <code><a href="../reference/antibiogram.html">wisca()</a></c
</tr></thead>
<tbody>
<tr class="odd">
<td align="left">No UCI</td>
<td align="left">70% (67.8-72.4%)</td>
<td align="left">85.3% (83.3-87.2%)</td>
<td align="left">87% (85.3-88.8%)</td>
<td align="left">Non-UCI</td>
<td align="left">70.4% (68-72.8%)</td>
<td align="left">86.7% (84.6-88.7%)</td>
<td align="left">88.5% (86.5-90.2%)</td>
</tr>
<tr class="even">
<td align="left">UCI</td>
<td align="left">80.9% (77.7-83.9%)</td>
<td align="left">88.2% (85.5-90.6%)</td>
<td align="left">90.9% (88.7-93%)</td>
<td align="left">80.3% (77.2-83.5%)</td>
<td align="left">88.4% (85.5-90.8%)</td>
<td align="left">91% (88.4-93.1%)</td>
</tr>
</tbody>
</table>
</div>
<div class="section level3">
<h3 id="interpreting-the-output">Interpreting the output<a class="anchor" aria-label="anchor" href="#interpreting-the-output"></a>
</h3>
<p>Each row shows the estimated empirical coverage for a regimen, with a
95% credible interval. When comparing regimens:</p>
<ul>
<li>
<strong>Overlapping credible intervals</strong> mean there is no
statistically significant difference in coverage. If a narrower-spectrum
regimen overlaps with a broader one, the narrower-spectrum option can be
preferred on stewardship grounds.</li>
<li>
<strong>Non-overlapping credible intervals</strong> indicate a
clinically meaningful difference in coverage.</li>
</ul>
</div>
</div>
<div class="section level2">
<h2 id="sensible-defaults-which-can-be-customised">Sensible defaults, which can be customised<a class="anchor" aria-label="anchor" href="#sensible-defaults-which-can-be-customised"></a>
@@ -407,14 +497,43 @@ susceptible</li>
</ul>
</div>
<div class="section level2">
<h2 id="practical-considerations">Practical considerations<a class="anchor" aria-label="anchor" href="#practical-considerations"></a>
</h2>
<ul>
<li>
<strong>First isolates only</strong>: always deduplicate using
<code><a href="../reference/first_isolate.html">first_isolate()</a></code> before running WISCA. Repeat isolates
introduce bias.</li>
<li>
<strong>Pathogen selection</strong>: consider filtering with
<code><a href="../reference/top_n_microorganisms.html">top_n_microorganisms()</a></code>. Including rare contaminants
(e.g. CoNS without clinical context) can distort estimates and may
artificially lower coverage (Cook <em>et al.</em>, 2022).</li>
<li>
<strong>Sample size</strong>: coverage estimates become reliable
with approximately 100+ isolates. For smaller datasets, consider pooling
data from multiple sites, but only after verifying that pathogen
distributions are sufficiently similar (Bielicki <em>et al.</em>,
2016).</li>
<li>
<strong>Culture request bias</strong>: WISCA is only as good as the
data it is based on. If cultures are selectively requested (e.g. only
after treatment failure), the dataset will be biased towards resistant
isolates. A robust culture policy is essential for reliable
estimates.</li>
</ul>
</div>
<div class="section level2">
<h2 id="limitations">Limitations<a class="anchor" aria-label="anchor" href="#limitations"></a>
</h2>
<ul>
<li>It assumes your data are representative</li>
<li>No adjustment for patient-level covariates, although these could be
passed onto the <code>syndromic_group</code> argument</li>
<li>WISCA does not model resistance over time, you might want to use
<code>tidymodels</code> for that, for which we <a href="https://amr-for-r.org/articles/AMR_with_tidymodels.html">wrote a
<li>It assumes your data are representative of the patient population
you are treating</li>
<li>No direct adjustment for patient-level covariates, although these
can be passed onto the <code>syndromic_group</code> argument for
stratification</li>
<li>WISCA does not model resistance trends over time; for that, you
might want to use <code>tidymodels</code>, for which we <a href="https://amr-for-r.org/articles/AMR_with_tidymodels.html">wrote a
basic introduction</a>
</li>
</ul>
@@ -424,24 +543,48 @@ basic introduction</a>
</h2>
<p>WISCA enables:</p>
<ul>
<li>Empirical regimen comparison,</li>
<li>Syndrome-specific coverage estimation,</li>
<li>Fully probabilistic interpretation.</li>
<li>
<strong>Empirical regimen comparison</strong>, answering the
clinicians actual question</li>
<li>
<strong>Syndrome-specific coverage estimation</strong>, stratifiable
by any clinical variable</li>
<li>
<strong>Fully probabilistic interpretation</strong>, with credible
intervals that honestly communicate uncertainty</li>
</ul>
<p>It is available in the <code>AMR</code> package via either:</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/antibiogram.html">wisca</a></span><span class="op">(</span><span class="va">...</span><span class="op">)</span></span>
<span></span>
<span><span class="fu"><a href="../reference/antibiogram.html">antibiogram</a></span><span class="op">(</span><span class="va">...</span>, wisca <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="reference">Reference<a class="anchor" aria-label="anchor" href="#reference"></a>
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a>
</h2>
<p>Bielicki, JA, et al. (2016). <em>Selecting appropriate empirical
antibiotic regimens for paediatric bloodstream infections: application
of a Bayesian decision model to local and pooled antimicrobial
resistance surveillance data.</em> <strong>J Antimicrob
Chemother</strong>. 71(3):794-802. <a href="https://doi.org/10.1093/jac/dkv397" class="external-link uri">https://doi.org/10.1093/jac/dkv397</a></p>
<ol style="list-style-type: decimal">
<li>Hebert C, Ridgway J, Vekhter B, Brown EC, Weber SG, Robicsek A.
Demonstration of the weighted-incidence syndromic combination
antibiogram: an empiric prescribing decision aid. <em>Infect Control
Hosp Epidemiol.</em> 2012;33(4):381-388. <a href="https://doi.org/10.1086/664768" class="external-link uri">https://doi.org/10.1086/664768</a>
</li>
<li>Randhawa V, Sarwar S, Walker S, Elligsen M, Palmay L, Daneman N.
Weighted-incidence syndromic combination antibiograms to guide empiric
treatment of critical care infections: a retrospective cohort study.
<em>Crit Care.</em> 2014;18(3):R112. <a href="https://doi.org/10.1186/cc13901" class="external-link uri">https://doi.org/10.1186/cc13901</a>
</li>
<li>Bielicki JA, Sharland M, Johnson AP, Henderson KL, Cromwell DA.
Selecting appropriate empirical antibiotic regimens for paediatric
bloodstream infections: application of a Bayesian decision model to
local and pooled antimicrobial resistance surveillance data. <em>J
Antimicrob Chemother.</em> 2016;71(3):794-802. <a href="https://doi.org/10.1093/jac/dkv397" class="external-link uri">https://doi.org/10.1093/jac/dkv397</a>
</li>
<li>Cook A, Sharland M, Yau Y, Bielicki J. Improving empiric antibiotic
prescribing in pediatric bloodstream infections: a potential application
of weighted-incidence syndromic combination antibiograms (WISCA).
<em>Expert Rev Anti Infect Ther.</em> 2022;20(3):445-456. <a href="https://doi.org/10.1080/14787210.2021.1967145" class="external-link uri">https://doi.org/10.1080/14787210.2021.1967145</a>
</li>
</ol>
</div>
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
</nav></aside>