1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 02:32:07 +02:00

Built site for AMR@2.1.1.9134: e740aa6

This commit is contained in:
github-actions
2025-01-27 22:18:38 +00:00
parent be20858eae
commit 20c26cd21b
80 changed files with 109 additions and 105 deletions

View File

@ -9,7 +9,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<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="">2.1.1.9133</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9134</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">
@ -294,8 +294,8 @@ Adhering to previously described approaches (see Source) and especially the Baye
<h3 id="plotting">Plotting<a class="anchor" aria-label="anchor" href="#plotting"></a></h3>
<p>All types of antibiograms as listed above can be plotted (using <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> or base <span style="R">R</span>'s <code><a href="plot.html">plot()</a></code> and <code><a href="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><a href="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>All types of antibiograms as listed above can be plotted (using <code><a href="https://ggplot2.tidyverse.org/reference/autoplot.html" class="external-link">ggplot2::autoplot()</a></code> or base <span style="R">R</span>'s <code><a href="plot.html">plot()</a></code> and <code><a href="https://rdrr.io/r/graphics/barplot.html" class="external-link">barplot()</a></code>). As mentioned above, the numeric values of an antibiogram are stored in a long format as the <a href="https://rdrr.io/r/base/attributes.html" class="external-link">attribute</a> <code>long_numeric</code>. You can retrieve them using <code>attributes(x)$long_numeric</code>, where <code>x</code> is the outcome of <code>antibiogram()</code> or <code>wisca()</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><a href="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>
@ -305,7 +305,7 @@ Adhering to previously described approaches (see Source) and especially the Baye
<p>WISCA, as outlined by Barbieri <em>et al.</em> (<a href="https://doi.org/10.1186/s13756-021-00939-2" class="external-link">doi:10.1186/s13756-021-00939-2</a>
<p>WISCA, as outlined by Bielicki <em>et al.</em> (<a href="https://doi.org/10.1093/jac/dkv397" class="external-link">doi:10.1093/jac/dkv397</a>
), stands for Weighted-Incidence Syndromic Combination Antibiogram, which estimates the probability of adequate empirical antimicrobial regimen coverage for specific infection syndromes. This method leverages a Bayesian hierarchical logistic regression framework with random effects for pathogens and regimens, enabling robust estimates in the presence of sparse data.</p>
<p>The Bayesian model assumes conjugate priors for parameter estimation. For example, the coverage probability \(\theta\) for a given antimicrobial regimen is modelled using a Beta distribution as a prior:</p>
<p>$$\theta \sim \text{Beta}(\alpha_0, \beta_0)$$</p>
@ -313,13 +313,17 @@ Adhering to previously described approaches (see Source) and especially the Baye
<p>$$y \sim \text{Binomial}(n, \theta)$$</p>
<p>Posterior parameter estimates are obtained by combining the prior and likelihood using Bayes' theorem. The posterior distribution of \(\theta\) is also a Beta distribution:</p>
<p>$$\theta | y \sim \text{Beta}(\alpha_0 + y, \beta_0 + n - y)$$</p>
<p>Pathogen incidence, representing the proportion of infections caused by different pathogens, is modelled using a Dirichlet distribution, which is the natural conjugate prior for multinomial outcomes. The Dirichlet distribution is parameterised by a vector of concentration parameters \(\alpha\), where each \(\alpha_i\) corresponds to a specific pathogen. The prior is typically chosen to be uniform (\(\alpha_i = 1\)), reflecting an assumption of equal prior probability across pathogens.</p>
<p>The posterior distribution of pathogen incidence is then given by:</p>
<p>$$\text{Dirichlet}(\alpha_1 + n_1, \alpha_2 + n_2, \dots, \alpha_K + n_K)$$</p>
<p>where \(n_i\) is the number of infections caused by pathogen \(i\) observed in the data. For practical implementation, pathogen incidences are sampled from their posterior using normalised Gamma-distributed random variables:</p>
<p>$$x_i \sim \text{Gamma}(\alpha_i + n_i, 1)$$
$$p_i = \frac{x_i}{\sum_{j=1}^K x_j}$$</p>
<p>where \(x_i\) represents unnormalised pathogen counts, and \(p_i\) is the normalised proportion for pathogen \(i\).</p>
<p>For hierarchical modelling, pathogen-level effects (e.g., differences in resistance patterns) and regimen-level effects are modelled using Gaussian priors on log-odds. This hierarchical structure ensures partial pooling of estimates across groups, improving stability in strata with small sample sizes. The model is implemented using Hamiltonian Monte Carlo (HMC) sampling.</p>
<p>Stratified results can be provided based on covariates such as age, sex, and clinical complexity (e.g., prior antimicrobial treatments or renal/urological comorbidities) using <code>dplyr</code>'s <code><a href="https://dplyr.tidyverse.org/reference/group_by.html" class="external-link">group_by()</a></code> as a pre-processing step before running <code>wisca()</code>. In this case, posterior odds ratios (ORs) are derived to quantify the effect of these covariates on coverage probabilities:</p>
<p>$$\text{OR}_{\text{covariate}} = \frac{\exp(\beta_{\text{covariate}})}{\exp(\beta_0)}$$</p>
<p>By combining empirical data with prior knowledge, WISCA overcomes the limitations
of traditional combination antibiograms, offering disease-specific, patient-stratified
estimates with robust uncertainty quantification. This tool is invaluable for antimicrobial
stewardship programs and empirical treatment guideline refinement.</p>
<p>By combining empirical data with prior knowledge, WISCA overcomes the limitations of traditional combination antibiograms, offering disease-specific, patient-stratified estimates with robust uncertainty quantification. This tool is invaluable for antimicrobial stewardship programs and empirical treatment guideline refinement.</p>
</div>
<div class="section level2">
<h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>