From e740aa691bcf94f83ee754c4b225c5cff0897786 Mon Sep 17 00:00:00 2001 From: Matthijs Berends Date: Mon, 27 Jan 2025 23:11:10 +0100 Subject: [PATCH] (v2.1.1.9134) add Gamma to WISCA documentation --- DESCRIPTION | 2 +- NEWS.md | 2 +- PythonPackage/AMR/AMR.egg-info/PKG-INFO | 2 +- ...ny.whl => AMR-2.1.1.9134-py3-none-any.whl} | Bin 10166 -> 10167 bytes PythonPackage/AMR/dist/amr-2.1.1.9133.tar.gz | Bin 10022 -> 0 bytes PythonPackage/AMR/dist/amr-2.1.1.9134.tar.gz | Bin 0 -> 10004 bytes PythonPackage/AMR/setup.py | 2 +- R/antibiogram.R | 24 +++++++++++----- ....txt => gpt_training_text_v2.1.1.9134.txt} | 26 ++++++++++++------ man/antibiogram.Rd | 24 +++++++++++----- 10 files changed, 56 insertions(+), 26 deletions(-) rename PythonPackage/AMR/dist/{AMR-2.1.1.9133-py3-none-any.whl => AMR-2.1.1.9134-py3-none-any.whl} (85%) delete mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9133.tar.gz create mode 100644 PythonPackage/AMR/dist/amr-2.1.1.9134.tar.gz rename data-raw/{gpt_training_text_v2.1.1.9133.txt => gpt_training_text_v2.1.1.9134.txt} (99%) diff --git a/DESCRIPTION b/DESCRIPTION index da893faff..644efd616 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 2.1.1.9133 +Version: 2.1.1.9134 Date: 2025-01-27 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 297421965..b43580523 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 2.1.1.9133 +# AMR 2.1.1.9134 *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)* diff --git a/PythonPackage/AMR/AMR.egg-info/PKG-INFO b/PythonPackage/AMR/AMR.egg-info/PKG-INFO index 0086df7ed..7d7c38b45 100644 --- a/PythonPackage/AMR/AMR.egg-info/PKG-INFO +++ b/PythonPackage/AMR/AMR.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.2 Name: AMR -Version: 2.1.1.9133 +Version: 2.1.1.9134 Summary: A Python wrapper for the AMR R package Home-page: https://github.com/msberends/AMR Author: Matthijs Berends diff --git a/PythonPackage/AMR/dist/AMR-2.1.1.9133-py3-none-any.whl b/PythonPackage/AMR/dist/AMR-2.1.1.9134-py3-none-any.whl similarity index 85% rename from PythonPackage/AMR/dist/AMR-2.1.1.9133-py3-none-any.whl rename to PythonPackage/AMR/dist/AMR-2.1.1.9134-py3-none-any.whl index 0928d1feac56fd044498c8490cc3bece1a5589e7..50bd386ae5687d435c774ba554afab66b79628d2 100644 GIT binary patch delta 646 zcmdnyzuliFz?+#xgn@y9gP~&MMxJn1rizW5Q&~k>Ky(e~5^klcjn+{Hol{=k)@{{%*$Gng0{di66g~&Hd=J%j5aG^D(oJ^iK(^Rn?50 zn{F_t=x)<}(PY8=lNGb-zeP^|R9}#p{amX%^VHi6jYFT+cqTp#o4%ljVUy3-gZ~O5 z^gcJ9emMEFjkE=a%vx?yr$bi`#lCf4^Lgj?jEH=XClWAc4 zdbX7zwVHCB)mvnLXWW1Jb*lNzZz~g>?mT#*%HE!?^I>VD{wW#xYt7er^gFvxDm5%y zb>h#gy4$<*3d+lEzxC-0^Dlh${rIz&ZF#(J<{j<{6qC*R?mm5!sq*Z(pLi4AW`}ec z=l-J!T#^ee$bzp=qP?HD6{y{ZeAm_cB42Z+4 c4&qp=t8l{Ocyfli8c?iXU6F0ADlnoM03~S$@c;k- delta 653 zcmdn)zs;W~z?+#xgn@y9gQ0!xMxJn1ruMa)Q&~k>Ky(e~5^klAwboHBhhLiAU{wF^l()Uv_D8GR5EC`8#v<;|F~c z_MDVd{M^_4Pvo@L9`PwFZQryD*XQ=7PN@nGt(Op=)|0&EckQE6?eos7X3oERhTS8! z!}#yzg@)a~r+l@aqrNU%O0v z3FqnC&&0P_b1JRe+#R=I$BRcRcb)1x>MQmlKeREbe*Mi#n;wnagHEBLUsO3i#r*P_ zERyQ?c^+qd<>am9H+V{&`M*lr_M{c9+I6ew;RH+e{nL&v4ajlYC)PCg&~?u#5X?n5;zm47*WJS8^G zVe&t>$lDXO_Aa|Rr}s^pGW#Rr&J*7zy4^l`Tuc1nKg(r-g*wZXMLuPoi0M>fI?nRP zSZ2oR+yn-L-wXlXj7%cTuoN(^b diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9133.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9133.tar.gz deleted file mode 100644 index d14fbcce23c1f8d0a1a8683d77dea30bd0929a1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10022 zcmch5WlS7E+bxSM?yiedT#GvtDHLsiB1MW9cVAqJyA^GL3hwUiRu*?Fbb-ZfcW>Xk zxyk)`|9oF2XL54pB+pFpB$M-i;<2#!5!rUANK0oAULiige@jA8SeVbt(gOt=?BKc9 zT5m6VYIxzd$*aL>vUFBfs9m6$mAjrkWHU1<;d`k^7aPf%(1uUBlE?b)&UL-#E@bQ! z*!PA+VI}=O6d!4=M)_A!4{}t59LbF^rD?EKj$V zBKLM+e{}vJUA2*N{=xp&uMUwL*T`DJ?bk>!_aj(fWf7@Vh6E`i372k=-`Di>kS0sW z_GvnblK_ZGaQA~8b>i!5Fj%Ot@(H|WN%-8esWgpreT$q4f-JSOW2?&#$bW1;dMr_K zjf1{_YZvw@H3e7&wGb5!g4`SpT85bcmA|CC$)y$giq~H&zl~@0N53fT(~ON)PUtlA z2v+W?b=4d10p_s3A@aPAk=6WwKB)jTS0(HOB`2Z5fJQBphl=dIcDcj&`3dnc8FkrYZd=+~s;l~0K=-MxoM~n_3Mz2Y zi^`i!m9Ir#rBW{vFP;SHlDz-8EXltg{Pz|sSAVR^k7@#x#Id{1;X^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7?Ue2uW=1`xvXwq0v;W)fK6o3es77Oc$$l=5#F?*;l zL{+Lz>YY#NDtjhX@n2O2lmPevo8#{ga#@#a_x?WE6ko#HLwhmrmgn<6(n6krDUQw(GXX>9?Q__tRf4-Q(K4z^l|AD~&Ci zz4+jPq2n`Af6QsQ(IVAuqlIBCfek(RT|+I*d)q*7s`i-B56|^Mz>w^qUy9A@0LnRs z%W0iP=Wu5)rjVH~>;!Xk=0i0Enel~md>lC}GiHtp+(Zx&T_cu$hquBU(mqyl;o&sV z-W_c^T2)|Yq;!pda|KgQo7*9>c*~R+za(nQ$MLEFC4`PxFDR|g$cnVZEWd5dR`S~K zohDkN87op;BWo}Y!h1Zv2FJE1?l*A})<_IUnB&?jePuecz#@3frr9v|^5FcpJ5Oqb zNi*lS3DS+|za{UUdVV8Zn~)|@$5HtzBg9J+O9xdxku_iH0LqpNkR{*uKNJ z2zB_1qasU@{ZGf!lrGazeJCl#UmyG_0=yHwQr^<2Uv&BP^YW@=#(-C*gr%$O6GV2Ii72Qfn_(Xs7M6`ZBLYt8dlOR5N$`y!{8rwUH8eT29uU>{% zai~AfY&E5^)dia>ktAMhJ&Q*Kz3PPOEXEeh!(bRkPp6n_e~(;GpS>ck;JhPhSgq@V zK>0(hBhy$8UI+lfdDnWXThUb%^1fy3&!dGCDX=o)baxgVkvabmvNMS}r?iiD@-D`R zbv?Od^YlW~4Z-x$>`XoZF6;~*VG&gRT7-TA`+x4N&$-~E4Y4>%J@wDguxf0S(i%Krg1__ogg diff --git a/PythonPackage/AMR/dist/amr-2.1.1.9134.tar.gz b/PythonPackage/AMR/dist/amr-2.1.1.9134.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fb19fe8232f7ac4c261a56f6e2492fc18a316c2a GIT binary patch literal 10004 zcmchcRZtv2*QU|IB?O1yVQ_Z{?hryC!QEkS_d$cZyIXK~3+~PU!6CT2&+`4dTeY=U z|IKc7o$ga_zttCA-CcE_CXYZyELmUcQ1bq$4OWTY^u2{{C;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mc+hK-PtfKes1VuR&?t+y*Si<>(KX}} zto_nFGvl5+2n~^Cc*_Wf7H@Z#J=pz!NROVYe}SP3B0o34KJCxlbM^)~?NIV>w5HG9 zA%Qfkr_i0QaOfSIoK4hEZR3SSjYe*@|3~Q^<0^6awn+KI)P~v1{>RnQvTYG?;4^qf z!Y^w1Wouhx=MwAq89G!@(6s`6#yv4RzACGa*CPBjm5{q_s?7AAz9?MRdztnp3=TfD3BTAU#5EI z04Y!^$@0~NoZWd7zJE(pBph!~BfKTedbHc`1(s4?!Fn!G;)mVrRNe~+ear+8OQr~7 z7x)x6x(VS(;6BNT#(cBkv%7}p?e9Fv4Hefuv-g$mGA)mpqHFSe`OP$!&m*D$Z_#GO bq$>A0>4(aHw>xB1gpwbWrS`yV!ovIy0)yZV literal 0 HcmV?d00001 diff --git a/PythonPackage/AMR/setup.py b/PythonPackage/AMR/setup.py index c27ecdd1b..3572c9c00 100644 --- a/PythonPackage/AMR/setup.py +++ b/PythonPackage/AMR/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='AMR', - version='2.1.1.9133', + version='2.1.1.9134', packages=find_packages(), install_requires=[ 'rpy2', diff --git a/R/antibiogram.R b/R/antibiogram.R index 3a362fa15..e3371925c 100755 --- a/R/antibiogram.R +++ b/R/antibiogram.R @@ -188,15 +188,15 @@ #' #' ### Plotting #' -#' All types of antibiograms as listed above can be plotted (using [ggplot2::autoplot()] or base \R's [plot()] and [barplot()]). +#' All types of antibiograms as listed above can be plotted (using [ggplot2::autoplot()] or base \R's [plot()] and [barplot()]). As mentioned above, the numeric values of an antibiogram are stored in a long format as the [attribute][attributes()] `long_numeric`. You can retrieve them using `attributes(x)$long_numeric`, where `x` is the outcome of [antibiogram()] or [wisca()]. #' -#' THe outcome of [antibiogram()] can also be used directly in R Markdown / Quarto (i.e., `knitr`) for reports. In this case, [knitr::kable()] will be applied automatically and microorganism names will even be printed in italics at default (see argument `italicise`). +#' The outcome of [antibiogram()] can also be used directly in R Markdown / Quarto (i.e., `knitr`) for reports. In this case, [knitr::kable()] will be applied automatically and microorganism names will even be printed in italics at default (see argument `italicise`). #' #' You can also use functions from specific 'table reporting' packages to transform the output of [antibiogram()] to your needs, e.g. with `flextable::as_flextable()` or `gt::gt()`. #' #' @section Why Use WISCA?: #' -#' WISCA, as outlined by Barbieri *et al.* (\doi{10.1186/s13756-021-00939-2}), 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. +#' WISCA, as outlined by Bielicki *et al.* (\doi{10.1093/jac/dkv397}), 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. #' #' The Bayesian model assumes conjugate priors for parameter estimation. For example, the coverage probability \eqn{\theta} for a given antimicrobial regimen is modelled using a Beta distribution as a prior: #' @@ -210,16 +210,26 @@ #' #' \deqn{\theta | y \sim \text{Beta}(\alpha_0 + y, \beta_0 + n - y)} #' +#' 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 \eqn{\alpha}, where each \eqn{\alpha_i} corresponds to a specific pathogen. The prior is typically chosen to be uniform (\eqn{\alpha_i = 1}), reflecting an assumption of equal prior probability across pathogens. +#' +#' The posterior distribution of pathogen incidence is then given by: +#' +#' \deqn{\text{Dirichlet}(\alpha_1 + n_1, \alpha_2 + n_2, \dots, \alpha_K + n_K)} +#' +#' where \eqn{n_i} is the number of infections caused by pathogen \eqn{i} observed in the data. For practical implementation, pathogen incidences are sampled from their posterior using normalised Gamma-distributed random variables: +#' +#' \deqn{x_i \sim \text{Gamma}(\alpha_i + n_i, 1)} +#' \deqn{p_i = \frac{x_i}{\sum_{j=1}^K x_j}} +#' +#' where \eqn{x_i} represents unnormalised pathogen counts, and \eqn{p_i} is the normalised proportion for pathogen \eqn{i}. +#' #' 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. #' #' 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 `dplyr`'s [group_by()] as a pre-processing step before running [wisca()]. In this case, posterior odds ratios (ORs) are derived to quantify the effect of these covariates on coverage probabilities: #' #' \deqn{\text{OR}_{\text{covariate}} = \frac{\exp(\beta_{\text{covariate}})}{\exp(\beta_0)}} #' -#' 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. +#' 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. #' #' @source #' * Bielicki JA *et al.* (2016). **Selecting appropriate empirical antibiotic regimens for paediatric bloodstream infections: application of a Bayesian decision model to local and pooled antimicrobial resistance surveillance data** *Journal of Antimicrobial Chemotherapy* 71(3); \doi{10.1093/jac/dkv397} diff --git a/data-raw/gpt_training_text_v2.1.1.9133.txt b/data-raw/gpt_training_text_v2.1.1.9134.txt similarity index 99% rename from data-raw/gpt_training_text_v2.1.1.9133.txt rename to data-raw/gpt_training_text_v2.1.1.9134.txt index fee431601..6849314aa 100644 --- a/data-raw/gpt_training_text_v2.1.1.9133.txt +++ b/data-raw/gpt_training_text_v2.1.1.9134.txt @@ -1,6 +1,6 @@ This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse. -First and foremost, you are trained on version 2.1.1.9133. Remember this whenever someone asks which AMR package version you’re at. +First and foremost, you are trained on version 2.1.1.9134. Remember this whenever someone asks which AMR package version you’re at. Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens. ---------------------------------------------------------------------------------------------------- @@ -1845,9 +1845,9 @@ Note that for types 2 and 3 (Combination Antibiogram and Syndromic Antibiogram), \subsection{Plotting}{ -All types of antibiograms as listed above can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R's \code{\link[=plot]{plot()}} and \code{\link[=barplot]{barplot()}}). +All types of antibiograms as listed above can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R's \code{\link[=plot]{plot()}} and \code{\link[=barplot]{barplot()}}). As mentioned above, the numeric values of an antibiogram are stored in a long format as the \link[=attributes]{attribute} \code{long_numeric}. You can retrieve them using \code{attributes(x)$long_numeric}, where \code{x} is the outcome of \code{\link[=antibiogram]{antibiogram()}} or \code{\link[=wisca]{wisca()}}. -THe outcome of \code{\link[=antibiogram]{antibiogram()}} can also be used directly in R Markdown / Quarto (i.e., \code{knitr}) for reports. In this case, \code{\link[knitr:kable]{knitr::kable()}} will be applied automatically and microorganism names will even be printed in italics at default (see argument \code{italicise}). +The outcome of \code{\link[=antibiogram]{antibiogram()}} can also be used directly in R Markdown / Quarto (i.e., \code{knitr}) for reports. In this case, \code{\link[knitr:kable]{knitr::kable()}} will be applied automatically and microorganism names will even be printed in italics at default (see argument \code{italicise}). You can also use functions from specific 'table reporting' packages to transform the output of \code{\link[=antibiogram]{antibiogram()}} to your needs, e.g. with \code{flextable::as_flextable()} or \code{gt::gt()}. } @@ -1855,7 +1855,7 @@ You can also use functions from specific 'table reporting' packages to transform \section{Why Use WISCA?}{ -WISCA, as outlined by Barbieri \emph{et al.} (\doi{10.1186/s13756-021-00939-2}), 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. +WISCA, as outlined by Bielicki \emph{et al.} (\doi{10.1093/jac/dkv397}), 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. The Bayesian model assumes conjugate priors for parameter estimation. For example, the coverage probability \eqn{\theta} for a given antimicrobial regimen is modelled using a Beta distribution as a prior: @@ -1869,16 +1869,26 @@ Posterior parameter estimates are obtained by combining the prior and likelihood \deqn{\theta | y \sim \text{Beta}(\alpha_0 + y, \beta_0 + n - y)} +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 \eqn{\alpha}, where each \eqn{\alpha_i} corresponds to a specific pathogen. The prior is typically chosen to be uniform (\eqn{\alpha_i = 1}), reflecting an assumption of equal prior probability across pathogens. + +The posterior distribution of pathogen incidence is then given by: + +\deqn{\text{Dirichlet}(\alpha_1 + n_1, \alpha_2 + n_2, \dots, \alpha_K + n_K)} + +where \eqn{n_i} is the number of infections caused by pathogen \eqn{i} observed in the data. For practical implementation, pathogen incidences are sampled from their posterior using normalised Gamma-distributed random variables: + +\deqn{x_i \sim \text{Gamma}(\alpha_i + n_i, 1)} +\deqn{p_i = \frac{x_i}{\sum_{j=1}^K x_j}} + +where \eqn{x_i} represents unnormalised pathogen counts, and \eqn{p_i} is the normalised proportion for pathogen \eqn{i}. + 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. 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}'s \code{\link[=group_by]{group_by()}} as a pre-processing step before running \code{\link[=wisca]{wisca()}}. In this case, posterior odds ratios (ORs) are derived to quantify the effect of these covariates on coverage probabilities: \deqn{\text{OR}_{\text{covariate}} = \frac{\exp(\beta_{\text{covariate}})}{\exp(\beta_0)}} -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. +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. } \examples{ diff --git a/man/antibiogram.Rd b/man/antibiogram.Rd index 786314dc7..57cae0723 100644 --- a/man/antibiogram.Rd +++ b/man/antibiogram.Rd @@ -223,9 +223,9 @@ Note that for types 2 and 3 (Combination Antibiogram and Syndromic Antibiogram), \subsection{Plotting}{ -All types of antibiograms as listed above can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R's \code{\link[=plot]{plot()}} and \code{\link[=barplot]{barplot()}}). +All types of antibiograms as listed above can be plotted (using \code{\link[ggplot2:autoplot]{ggplot2::autoplot()}} or base \R's \code{\link[=plot]{plot()}} and \code{\link[=barplot]{barplot()}}). As mentioned above, the numeric values of an antibiogram are stored in a long format as the \link[=attributes]{attribute} \code{long_numeric}. You can retrieve them using \code{attributes(x)$long_numeric}, where \code{x} is the outcome of \code{\link[=antibiogram]{antibiogram()}} or \code{\link[=wisca]{wisca()}}. -THe outcome of \code{\link[=antibiogram]{antibiogram()}} can also be used directly in R Markdown / Quarto (i.e., \code{knitr}) for reports. In this case, \code{\link[knitr:kable]{knitr::kable()}} will be applied automatically and microorganism names will even be printed in italics at default (see argument \code{italicise}). +The outcome of \code{\link[=antibiogram]{antibiogram()}} can also be used directly in R Markdown / Quarto (i.e., \code{knitr}) for reports. In this case, \code{\link[knitr:kable]{knitr::kable()}} will be applied automatically and microorganism names will even be printed in italics at default (see argument \code{italicise}). You can also use functions from specific 'table reporting' packages to transform the output of \code{\link[=antibiogram]{antibiogram()}} to your needs, e.g. with \code{flextable::as_flextable()} or \code{gt::gt()}. } @@ -233,7 +233,7 @@ You can also use functions from specific 'table reporting' packages to transform \section{Why Use WISCA?}{ -WISCA, as outlined by Barbieri \emph{et al.} (\doi{10.1186/s13756-021-00939-2}), 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. +WISCA, as outlined by Bielicki \emph{et al.} (\doi{10.1093/jac/dkv397}), 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. The Bayesian model assumes conjugate priors for parameter estimation. For example, the coverage probability \eqn{\theta} for a given antimicrobial regimen is modelled using a Beta distribution as a prior: @@ -247,16 +247,26 @@ Posterior parameter estimates are obtained by combining the prior and likelihood \deqn{\theta | y \sim \text{Beta}(\alpha_0 + y, \beta_0 + n - y)} +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 \eqn{\alpha}, where each \eqn{\alpha_i} corresponds to a specific pathogen. The prior is typically chosen to be uniform (\eqn{\alpha_i = 1}), reflecting an assumption of equal prior probability across pathogens. + +The posterior distribution of pathogen incidence is then given by: + +\deqn{\text{Dirichlet}(\alpha_1 + n_1, \alpha_2 + n_2, \dots, \alpha_K + n_K)} + +where \eqn{n_i} is the number of infections caused by pathogen \eqn{i} observed in the data. For practical implementation, pathogen incidences are sampled from their posterior using normalised Gamma-distributed random variables: + +\deqn{x_i \sim \text{Gamma}(\alpha_i + n_i, 1)} +\deqn{p_i = \frac{x_i}{\sum_{j=1}^K x_j}} + +where \eqn{x_i} represents unnormalised pathogen counts, and \eqn{p_i} is the normalised proportion for pathogen \eqn{i}. + 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. 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}'s \code{\link[=group_by]{group_by()}} as a pre-processing step before running \code{\link[=wisca]{wisca()}}. In this case, posterior odds ratios (ORs) are derived to quantify the effect of these covariates on coverage probabilities: \deqn{\text{OR}_{\text{covariate}} = \frac{\exp(\beta_{\text{covariate}})}{\exp(\beta_0)}} -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. +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. } \examples{