Dynamics of gut mucosal colonisation with extended spectrum beta-lactamase producing Enterobacterales in Malawi

Shortening courses of antimicrobials has been proposed to reduce risk of antimicrobial resistant (AMR) infections, but acquisition and selection dynamics under antimicrobial pressure at the individual level are poorly understood. We combine multi-state modelling and whole-genome sequencing to understand colonisation dynamics of extended-spectrum beta-lactamase producing Enterobacterales (ESBL-E) in Malawian adults. We demonstrate prolonged post-exposure antibiotic effect, meaning short courses exert similar colonisation pressure to longer ones. Genome data does not identify widespread hospital-associated ESBL-E transmission, hence apparent acquisitions may be selected from the patient microbiota by antimicrobial exposure. Understanding ESBL-E dynamics under antimicrobial pressure is crucial for evidence-based stewardship protocols.


Introduction
Antimicrobials are one of the most successful therapies available to modern medicine, but the spread of antimicrobial resistance (AMR) is a threat to their effective use. Significant global effort is being directed at antimicrobial stewardship programmes designed to optimise antimicrobial use, both to avoid dispensing these 55 agents where not warranted and, where they are deemed to be necessary, minimising both duration of exposure and spectrum of bacteria affected 1 . These principles are guided in part by well-described population level associations between antimicrobial exposure and prevalence of AMR at multiple spatial and temporal scales [2][3][4] . Antimicrobial stewardship interventions at the individual level often 60 emphasise rationalisation of antimicrobials through narrowing their spectrum of action as soon as possible after commencement of broad empiric antimicrobial therapy in severely unwell individuals. The time frame (e.g., 48 hours) for this is typically pragmatically selected based on likely availability of diagnostic test results.
This rationalisation of therapy is, in part, based on the assumption that it will reduce

Results
Antimicrobial exposure is associated with rapid and prolonged increase in ESBL-E prevalence Between 19 th Table   1 and Supplementary Figures 2 and 3). 115 Baseline prevalence of ESBL-E colonization was 178/420 42% (95% CI 38-47%). In univariable modelling, HIV infection was associated with baseline ESBL-E colonization, an effect that multivariable logistic regression modelling suggested was largely driven by CPT exposure ( is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021. 10.08.21264775 doi: medRxiv preprint ESBL-E prevalence at baseline was higher in the participants recruited in hospital ( Figure 1A and Supplementary Table 1) than community members, a finding that was explained by prior healthcare exposure and increased HIV prevalence (and hence CPT exposure) in the former group (Tables 1 and 2).
Following enrolment, there was rapid increase in ESBL-E colonisation prevalence in 130 the antimicrobial exposed inpatient group (109/222 [49%] at day 0 to 127/162 [78%] at day 7) compared to the inpatient antimicrobial-unexposed group (41/99 [41%] at day 0 to 32/62 [51%] at day 7, Figure 1A). The most commonly received antimicrobial was, as expected, ceftriaxone (183/225, 80%) but co-trimoxazole is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021. 10.08.21264775 doi: medRxiv preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint  is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint

Figure 1: Prevalence and determinants of longitudinal ESBL-E carriage. A:
ESBL prevalence stratified by the three study groups; inpatients exposed to antimicrobials (red), inpatients without antimicrobial exposure (blue), community 180 members (green), showing sharp increase in prevalence following antimicrobial exposure. Prevalence is estimated using a LOESS non-parametric regression with 95% confidence interval. Community members are censored on antimicrobial exposure or hospitalization and antimicrobial-unexposed inpatients on antimicrobial exposure. B: simulated ESBL-E prevalence using final fitted model for a hypothetical 185 cohort of patients with initial ESBL-E colonisation prevalence 50%, admitted to hospital for seven days and exposed to seven, two or zero days of antimicrobials, showing that there is little difference between seven and two days. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint We used continuous-time multi-state Markov models to understand determinants of ESBL-E carriage. In this model, each patient was assumed to exist at any one time in either a "colonised" or "non-colonised" state, with the transition rate between states governed by a linear function of time-varying covariates (hospitalisation and 205 antimicrobial exposure). When comparing a stepwise-constant covariate model (where the effect of hospitalization and antimicrobial exposure cease immediately as exposure ceases) to a model which included a prolonged effect of antimicrobial exposure, modelled as an exponential decay that continues to exert an effect when exposure ceases, the latter was a better fit to the data as assessed by leave-one-out is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. little difference in ESBL-E prevalence carriage from truncating seven days of antimicrobial therapy to two days.
Whole genome sequencing does not support horizontal gene transfer as the primary mechanism of within-participant ESBL persistence 230 Next we used short-read whole-genome sequencing as a high-resolution typing tool to track bacteria and ESBL genes within study participants. Following quality control, is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint Hospital associated lineages or transmission clusters are unusual Next, we examined any hospital association of popPUNK clusters. In-hospital and post-discharge isolates were distributed throughout the core-gene phylogenies and only one popPUNK cluster contained more hospital isolates than would be expected 290 by chance following correction for multiple comparisons ( Figure 4A-C). This corresponded to E. coli ST410; however, 20% (9/44) of isolates belonging to this popPUNK cluster classified as community-associated highlighting that it is not exclusively hospital-associated. Similarly, one contig-cluster was associated with inhospital isolation ( Figure 4D); the blaCTX-M-15 containing contig-cluster was primarily 295 associated with the hospital associated popPUNK cluster (Supplementary Figure   9B).
As hospital associated popPUNK clusters were unusual, we investigated putative hospital-related transmission clusters which differed by five or fewer whole genome  is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint community associated, compared to 70/181 (39%) of those that were not members of a SNP cluster (p = 0.1). The choice of 5 SNPs to define a SNP-cluster is a 315 common convention but is arbitrary; but in sensitivity analysis varying the SNP threshold from 0 to 10 did not significantly alter the conclusions ( Supplementary   Figures 11-13).

320
. CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint association of popPUNK cluster (C) and contig-cluster (D) with in-hospital isolation. Dotted line shows Bonferroni-corrected value corresponding to p = 0.05. Only one popPUNK cluster is significantly associated with in-hospital isolation (highlighted in red on the plot, C, and core gene tree, A) at this level. Similarly one contig-cluster is associated with in-hospital isolation, highlighted in red; this is the contig-cluster 335 which is associated with the hospital-associated lineage. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint Third, using whole-genome sequencing as a high-resolution typing tool allowed us to approach the mechanism of the effect of antimicrobials in promoting ESBL-E carriage. A key question is whether the apparent rapid ESBL-E acquisition following the combination of hospital and antimicrobial exposure represents true transmission from healthcare settings facilitated by antimicrobial-induced loss of colonisation 420 resistance, or selection for low abundance resistant bacteria that were already present in the microbiota but not detected by bacterial culture. We found limited support for hospital associated lineages or hospital-associated transmission clusters suggesting either that ESBL-E acquisition had occurred in the community and was is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint gene transfer of ESBL genes between bacteria. Horizontal gene transfer could also explain an apparent lack of hospital-associated transmission clusters, if ESBL genes disseminated into diverse clones in the healthcare setting. We find that withinparticipant the popPUNK-cluster contig-cluster combination was conserved more 445 than either popPUNK-cluster or contig-cluster alone, consistent with the hypothesis that within-participant persistence of ESBL, where it occurs, is caused by persistence of ESBL-containing bacteria rather than horizontal gene transfer of ESBL genes to differing bacterial hosts. This does not support the hypothesis of horizontal gene transfer as primary mechanism of ESBL temporal persistence within-participant on 450 the timescale of the study.
There are limitations to our study. Most importantly, due to resource limitation, we took only one colony pick from each patient-time point sample for sequencing and so we may have missed intra-host ESBL-E diversity. Within-participant ESBL-E diversity was considerable over time, and we are unable to say whether this 455 represents frequent colonisation and de-colonisation or sampling of within-host diversity; previous studies have shown that some ESBL-E colonised participants harbour significant ESBL-E diversity 28 , so the latter is probable. Even so, if the single colony pick represented an unbiased sampling of one ESBL-E at each time point, our observations regarding temporal trends should remain valid. We used short read 460 sequencing and clustered ESBL-containing contigs as a proxy for mobile genetic elements (MGEs), which is likely to have introduced some error: short read sequencing and de-novo assembly is usually unable to fully assemble MGEs such as plasmids, upon which many ESBL genes would be expected to be carried. It is possible that short partially assembled ESBL-contigs representing (for example) 465 common ESBL-E containing transposons could be matched to longer plasmid fragments where the same transposon is carried on a different plasmid backbone. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint Also some ESBL genes are likely to be chromosomally integrated. Long read sequencing could provide the resolution to fully describe MGEs but was not carried out due to resource limitation. We used an arbitrary SNP threshold of 5 SNPs to 470 define SNP-clusters, a strong assumption; this cut-off (empirically derived) has been used by public health bodies in England and Canada to define possible E. coli outbreaks 29,30 ; other authors have suggested a cut-off of 10 or below 31 . Similar empirically derived SNP cut-offs of 7-12 have been suggested for K. pneumoniae complex 32-34 . Nevertheless this assumption could misclassify isolates, a risk we have 475 tried to mitigate with sensitivity analysis. We did not account for temporal distance between samples though variation in SNP distance due to acquisition of mutations over the course of the study (18 months) would be expected to be small based on experimentally determined rates of mutation acquisition 35 . We used a map-toreference approach to identify core-genome SNPs that could have introduced bias 480 due to the choice of reference. We have looked at high-level clustering with popPUNK and it may be that a high-resolution clustering approach using local, lineage-specific references would give the resolution to identify more hospital associated transmission events. The models of AMR carriage assumed a 100% sensitivity and specificity of sampling, which may not be valid. We were not able to 485 disaggregate the effect of different antimicrobial agents because of the sample size and so all were treated equivalently in the models, but it is likely that there is a differential effect on ESBL-E colonization between antimicrobial classes and agents.
The data do not allow us to comment on the generalisability of our modelling findings to other settings, including high income countries. 490 In conclusion, we describe the dynamics of ESBL-E colonisation in Malawian adults as they are exposed to antimicrobial therapy and hospitalization. Antimicrobial therapy acts rapidly to promote ESBL-E colonisation via a prolonged effect which . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint means that truncated courses of antimicrobials may have a similar effect to longer ones, which has implications for stewardship protocols. Short-read whole-genome 495 sequencing did not identify widespread hospital associated lineages or hospitalassociated transmission clusters suggesting either that ESBL-E acquisition had occurred in the community and was selected for by antimicrobial exposure in hospital, or that the diversity of isolates transmitted in the hospital was contained in the diversity of isolates in the community. Future work should define dynamics of 500 intra-host ESBL-E diversity under antimicrobial pressure, using longitudinal sampling, metagenomic sequencing methods to describe diversity and long-read sequencing to characterize MGEs. This will facilitate development of clinically relevant AMR endpoints for clinical trials and the development of a sound evidence base for stewardship protocols at the individual level -an evidence base which is 505 currently lacking.

Study setting and design
The study took place in Queen Elizabeth Central Hospital (QECH), Blantyre, Malawi, a government tertiary referral hospital for the Southern Region of Malawi which 510 provides free healthcare to the ~800,000 residents 36 of urban Blantyre. Adults (> 15 years) with sepsis, defined by fever and organ dysfunction criteria, were recruited from the emergency department of QECH 0700-1700 Monday to Friday as part of a study of sepsis aetiology, as described elsewhere 37 . Two comparator cohorts of participants were recruited: age and sex matched adults from QECH emergency 515 department who had a plan from their attending clinical team to admit to hospital but no plan for antimicrobial administration; and community members matched by age, sex and home location to recruited sepsis patients. Exclusion criteria for the latter . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint two groups were antimicrobial exposure within the past four weeks (except cotrimoxazole preventative therapy [CPT] and antituberculous chemotherapy); 520 hospitalised participants who lacked capacity to give informed consent and had no guardian to give proxy consent; participants who spoke neither English nor Chichewa; and participants who lived > 30km from Blantyre city. Geographic matching on home location between community members and sepsis patients was achieved by random walk from the houses of sepsis participants with initial direction 525 established by spinning a bottle on the floor. Written informed consent was obtained from all participants. An admission questionnaire was administered to all participants at enrolment and hospitalised patients were reviewed daily by a study team member until discharge to extract details of antimicrobial therapy from the clinical record. All clinical decisions were at the discretion of the attending clinical team. Further review 530 by the study team occurred at day 7, 28, 90 and 180, except for community members in whom the day 7 and 90 visits were omitted. If participants failed to come to their scheduled visits, then they were traced by telephone or, if that failed, by home visit. Hospitalised patients were not financially compensated for their time, but all other participants were at a rate of 500MWK for home visits and 2000MWK for 535 hospital visits. Data were captured using a combination of direct electronic data entry by study team members onto tablet devices (ODK 38 , Get ODK inc. United States) and paper forms (TeleForm, Opentext, Canada). is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint

Microbiologic methods
At each study visit (enrolment, day 7, 28, 80 and 190 for hospitalised participants 545 and enrolment, day 28 and 190 for community members) stool was collected in a sterile polypropylene pot; if a participant was not able to provide a stool sample, then a rectal swab was taken by a trained study team member and stored in Ames' medium for transport. Stool and rectal swab samples were stored at 4ºC before being batch processed weekly: samples were plated directly onto commercially 550 available ESBL selective chromogenic agar (CHROMagar ESBL, CHROMagar, France) and cultured aerobically overnight. Morphologically distinct white or blue colonies were speciated with the API 20E system (Biomerieux, France); pink colonies were identified as E. coli. ESBL production was confirmed with the combination disc method on iso-sensitest agar with discs of cefotaxime (30 555 micrograms) and ceftazidime (30 micrograms) with and without clavulanic acid (10 micrograms), with ESBL production confirmed if there was a difference of 5mm or more between the clavulanic acid and non-clavulanic acid discs for either cephalosporin. For organisms likely to carry a chromosomal blaampC beta-lactamase gene and hence able to hydrolyse cefotaxime and ceftazidime (defined for our 560 purposes as Enterobacter spp., Citrobacter freundii, Morganella morganii, Providencia stuartii, Serratia spp., Hafnia alvei); cefipime (30 micrograms), an AmpC-stable cephalosporin was used with and without clavulanic acid (10 micrograms), and ESBL production confirmed if there was a difference of 5mm or more between the clavulanic acid and non-clavulanic acid discs. 565

DNA extraction, sequencing and bioinformatic analysis
One of each morphologically distinct K. pneumoniae species complex and E. coli colony, respectively, from each patient at each time point was taken forward for DNA . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint extraction and whole-genome sequencing. DNA was extracted from overnight nutrient broth culture using the Qiagen DNA mini kit as per the manufacturer's 570 instructions. Extracted DNA was shipped to the Wellcome Sanger Institute to undergo whole-genome sequencing using Illumina HiSeq X10 to produce 150bp paired end reads. Quality control, de-novo assembly and construction of core gene phylogeny are described elsewhere 18,19 ; in brief, species was confirmed with Kraken v0.10.6 and Braken v1.0 40 before de-novo assembly with SPAdes 41 , with the 575 modifications described by Page et al. 42 and annotation with prokka v1.5 43 using a genus specific database from RefSeq. The Roary v1.007 pan-genome pipeline 44 were used to identify core genes, considering genes contained in at least 99% isolates to be core. Samples with assembly failure (< 4Mb assembled length) and is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint schemes hosted at pubMLST (https://pubmlst.org/). To track putative mobile genetic 595 elements within-participant over time we clustered ESBL-containing contigs from the de novo assemblies (identified with BLAST 55 using the SRST2 database) to form contig-clusters using cd-hit-est v4.8.1 56 with 95% sequence identity and otherwise default settings. To track bacteria within-participant we used popPUNK 57 on mapped assemblies: we used snippy v4.6.0 58 to map reads to K-12 MG1655 E. coli (ENA 600 accession U00096) and MGH78578 K. pneumoniae (ENA accession GCA_000016305.1) references. The E. coli mapped assemblies had a mean (SD) coverage and depth of 92% (2%) and 58x (8x) respectively and the K. pneumoniae complex 92% (3%) and 52x (16x). We then used popPUNK v2.0.2 on these assemblies, forming a new database with minimum kmer size 15 (and otherwise 605 default settings) and clustering with the DBSCAN algorithm. To compare SNP distances between samples, we used these snippy-generated assemblies (i.e. using reads mapped to the references above) to construct a multiple sequence alignment), filtered regions of presumed recombination with gubbins 59 and calculated pairwise SNP distances using snp-dist v0.6.2 (https://github.com/tseemann/snp-dists) and 610 considered two isolates with 5 or fewer SNPs difference across the genome to be likely to represent the same isolate. We hence used this SNP difference to define a "SNP-cluster", clustering isolates with hierarchical clustering using the function stats::hclust in R. We performed sensitivity analysis and varied this SNP threshold from 0 -10. 615

Statistical analysis
All statistical analyses were carried out in R v4.0. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint equivalence of patient characteristics across the three study groups for continuous and categorical variables, respectively. Associations of baseline ESBL-E carriage were assessed using logistic regression, including all variables that were felt a priori to be associated with ESBL-E carriage as predictors, and presenting results as odds ratios for predictor variables with 95% confidence intervals. 625 To assess within-participant conservation of organism, popPUNK cluster, contigcluster, and SNP-cluster, we plotted within participant correlation curves, including all participants who were colonised with E. coli or K. pneumoniae at time t = 0 then using non-parametric LOESS regression as implemented in the R stats::loess function with parameters n= 80, span = 0.75 to estimate the proportion at a time t 630 later who were colonised with the same organism, popPUNK cluster, contig-cluster, or SNP-cluster. To assess the probability of two within-participant samples containing the same cluster by chance we compared the within-participant cluster conservation proportion to the proportion of between-sample participants that contained the same cluster. Odds ratios with 95% confidence intervals were used to 635 assess the odds of within-participant conservation of popPUNK cluster and contigcluster together or each alone compared to between-participant conservation.
We assessed for hospital associated lineages by mapping metadata to the core gene trees, defining isolates as either in-hospital (if they were isolated from a sample taken in hospital) recent discharge (if they were isolated from a sample taken up to 640 120 days following hospital admission) or community (if they were neither in-hospital nor recent discharge). We tested the hypothesis that popPUNK and contig clusters are healthcare associated by comparing the proportion of healthcare-associated isolates (defined as in-hospital or recent discharge) for each cluster to the proportion of the remaining samples, using a Bonferroni-corrected Fisher's exact test. 645 . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint We looked for putative transmission clusters by plotting SNP clusters using the R packages igraph 60 and ggraph. We used Fisher's exact test to compare the proportion of isolates that were community-associated between isolates that were members of a SNP-cluster and those that were not.

Modelling of ESBL-E carriage 650
Defining the likelihood of the model We assumed a two-state system with participants, where at time participant will be in a state ! ( ) -either ESBL-E colonised ( ! ( ) = 1) or ESBL-E uncolonised ( ! ( ) = 0). For each participant we assume have a measured value of ! ( ) at ! time points, the times of which are given by " ! , = 1,2 … ! , and so the ! values of 660 ! ( " ! ), = 1,2 … ! are known.
If we develop a model with parameters that predicts the probability of a particular participant being in a state ! ( # ) at a time point # given that they were in a state ! ( $ ) at an earlier time point $ then then the likelihood of this observation is: Where | indicates "conditional on" as per standard probability notation. Assuming that all observations are independent then the likelihood for any participant is the . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint product of all the transitions for that participant; and the likelihood of the data we observe is the product of all transitions for all participant: We assume a Markov model as the data-generating process, where the instantaneous probability of transition from a state to state is given by (" , or traditionally in matrix notation as the Q-matrix 17,58 (for a two state system): Where we have defined ( ) as the instantaneous rate of ESBL-E loss, and ( ) as 675 the instantaneous rate of ESBL-E gain, and used the fact that the rows of the Qmatrix must sum to one (i.e. every participant has to be in one state or another). If is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint  is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint The models were coded and fit in a Bayesian framework in Stan v2.19 61 accessed 710 via the Rstan v2.19.2 interface in R, and plotted using the bayesplot v1.8 R package.
All code and data to fit the models is contained in the blantyreESBL 39 v1.0.0 R package available at https://github.com/joelewis101/blantyreESBL. Weakly informative priors were used; a normal distribution with mean 0 and standard deviation 2 for alpha and beta (corresponding (corresponding to a hazard ratio of 715 7.4), a normal distribution with mean 0 and standard distribution 0.2 for mu and lambda and a normal distribution with a mean of 0 and standard deviation of 50 days for gamma. In each case models were fit with four chains of 1000 iterations each with 500 warmup iterations. Convergence was evaluated by inspection of traceplots and the Gelman-Rubin statistic 62 being close to 1. Posterior estimates of parameters 720 were expressed as medians with 95% credible intervals generated from the quantiles of the posterior, excluding warmup iterations. We fit two models: one with the stepwise-constant covariates and one with exponentially-decaying being close to 1.
Posterior estimates of parameters were expressed as medians with 95% credible intervals generated from the quantiles of the posterior, excluding warmup iterations. 725 We fit two models: one with the stepwise-constant covariates and one with exponentially-decaying effect of antimicrobial exposure.
To compare between the two models we used leave one out cross validation as implemented in the loo v2.1.0 package in R 63 , quantifying model fit with an estimate of the expected log predictive density (ELPD) and comparing models with the ELPD 730 difference and standard error of the difference, where a difference in ELPD of greater than two times the standard error of the difference could be interpreted as evidence in favour of the better fitting model 63 . We also used graphical posterior predictive checks, simulating the predicted prevalence of ESBL-E across the three arms of the study by generating a probability of ESBL-E carriage for each participant 735 . CC-BY 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted October 11, 2021. ; https://doi.org/10.1101/2021.10.08.21264775 doi: medRxiv preprint at each time point for each posterior samples (excluding warmup draws) and sampling from a Bernoulli distribution using the predicted probability. We simulated from the posterior by fixing covariate values, assuming a baseline prevalence of 50% ESBL carriage at t=0 and using all posterior draw covariate values (excluding warmup draws) and solving the likelihood differential equations using the R package 740 deSolve v1.28 64 to generate daily predicted probabilities of carriage at time t, with 95% confidence intervals defined by simple quantiles. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint