<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1d3 20150301//EN" "http://jats.nlm.nih.gov/publishing/1.1d3/JATS-journalpublishing1.dtd">
<article article-type="research-article" dtd-version="1.1d3" xml:lang="en" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">PLoS ONE</journal-id>
<journal-id journal-id-type="publisher-id">plos</journal-id>
<journal-id journal-id-type="pmc">plosone</journal-id>
<journal-title-group>
<journal-title>PLOS ONE</journal-title>
</journal-title-group>
<issn pub-type="epub">1932-6203</issn>
<publisher>
<publisher-name>Public Library of Science</publisher-name>
<publisher-loc>San Francisco, CA USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">PONE-D-20-12397</article-id>
<article-id pub-id-type="doi">10.1371/journal.pone.0237126</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Research Article</subject>
</subj-group>
<subj-group subj-group-type="Discipline-v3">
<subject>Medicine and health sciences</subject><subj-group><subject>Diagnostic medicine</subject><subj-group><subject>Virus testing</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Medicine and health sciences</subject><subj-group><subject>Medical conditions</subject><subj-group><subject>Infectious diseases</subject><subj-group><subject>Viral diseases</subject><subj-group><subject>COVID 19</subject></subj-group></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>People and places</subject><subj-group><subject>Geographical locations</subject><subj-group><subject>Africa</subject><subj-group><subject>South Africa</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Medicine and health sciences</subject><subj-group><subject>Epidemiology</subject><subj-group><subject>Pandemics</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Physical sciences</subject><subj-group><subject>Mathematics</subject><subj-group><subject>Probability theory</subject><subj-group><subject>Markov models</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Medicine and health sciences</subject><subj-group><subject>Epidemiology</subject><subj-group><subject>Infectious disease epidemiology</subject></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Medicine and health sciences</subject><subj-group><subject>Medical conditions</subject><subj-group><subject>Infectious diseases</subject><subj-group><subject>Infectious disease epidemiology</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Research and analysis methods</subject><subj-group><subject>Mathematical and statistical techniques</subject><subj-group><subject>Statistical methods</subject><subj-group><subject>Monte Carlo method</subject></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Physical sciences</subject><subj-group><subject>Mathematics</subject><subj-group><subject>Statistics</subject><subj-group><subject>Statistical methods</subject><subj-group><subject>Monte Carlo method</subject></subj-group></subj-group></subj-group></subj-group></subj-group><subj-group subj-group-type="Discipline-v3">
<subject>Research and analysis methods</subject><subj-group><subject>Mathematical and statistical techniques</subject><subj-group><subject>Mathematical models</subject><subj-group><subject>Random walk</subject></subj-group></subj-group></subj-group></subj-group></article-categories>
<title-group>
<article-title>Bayesian inference of COVID-19 spreading rates in South Africa</article-title>
<alt-title alt-title-type="running-head">Bayesian inference of COVID-19 spreading rates in South Africa</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes" xlink:type="simple">
<contrib-id authenticated="true" contrib-id-type="orcid">http://orcid.org/0000-0002-7337-9176</contrib-id>
<name name-style="western">
<surname>Mbuvha</surname> <given-names>Rendani</given-names></name>
<role content-type="https://casrai.org/credit/">Conceptualization</role>
<role content-type="https://casrai.org/credit/">Data curation</role>
<role content-type="https://casrai.org/credit/">Formal analysis</role>
<role content-type="https://casrai.org/credit/">Investigation</role>
<role content-type="https://casrai.org/credit/">Methodology</role>
<role content-type="https://casrai.org/credit/">Visualization</role>
<role content-type="https://casrai.org/credit/">Writing – original draft</role>
<role content-type="https://casrai.org/credit/">Writing – review &amp; editing</role>
<xref ref-type="aff" rid="aff001"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff002"><sup>2</sup></xref>
<xref ref-type="corresp" rid="cor001">*</xref>
</contrib>
<contrib contrib-type="author" xlink:type="simple">
<name name-style="western">
<surname>Marwala</surname> <given-names>Tshilidzi</given-names></name>
<role content-type="https://casrai.org/credit/">Conceptualization</role>
<role content-type="https://casrai.org/credit/">Supervision</role>
<role content-type="https://casrai.org/credit/">Writing – review &amp; editing</role>
<xref ref-type="aff" rid="aff002"><sup>2</sup></xref>
</contrib>
</contrib-group>
<aff id="aff001">
<label>1</label>
<addr-line>School of Statistics and Actuarial Science, University of Witwatersrand, Johannesburg, South Africa</addr-line>
</aff>
<aff id="aff002">
<label>2</label>
<addr-line>Institute of Intelligent Systems, University of Johannesburg, Johannesburg, South Africa</addr-line>
</aff>
<contrib-group>
<contrib contrib-type="editor" xlink:type="simple">
<name name-style="western">
<surname>Shaman</surname> <given-names>Jeffrey</given-names></name>
<role>Editor</role>
<xref ref-type="aff" rid="edit1"/>
</contrib>
</contrib-group>
<aff id="edit1">
<addr-line>Columbia University, UNITED STATES</addr-line>
</aff>
<author-notes>
<fn fn-type="conflict" id="coi001">
<p>The authors have declared that no competing interests exist.</p>
</fn>
<corresp id="cor001">* E-mail: <email xlink:type="simple">rendani.mbuvha@wits.ac.za</email></corresp>
</author-notes>
<pub-date pub-type="collection">
<year>2020</year>
</pub-date>
<pub-date pub-type="epub">
<day>5</day>
<month>8</month>
<year>2020</year>
</pub-date>
<volume>15</volume>
<issue>8</issue>
<elocation-id>e0237126</elocation-id>
<history>
<date date-type="received">
<day>28</day>
<month>4</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>20</day>
<month>7</month>
<year>2020</year>
</date>
</history>
<permissions>
<copyright-year>2020</copyright-year>
<copyright-holder>Mbuvha, Marwala</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="info:doi/10.1371/journal.pone.0237126"/>
<abstract>
<p>The Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) pandemic has highlighted the need for performing accurate inference with limited data. Fundamental to the design of rapid state responses is the ability to perform epidemiological model parameter inference for localised trajectory predictions. In this work, we perform Bayesian parameter inference using Markov Chain Monte Carlo (MCMC) methods on the Susceptible-Infected-Recovered (SIR) and Susceptible-Exposed-Infected-Recovered (SEIR) epidemiological models with time-varying spreading rates for South Africa. The results find two change points in the spreading rate of COVID-19 in South Africa as inferred from the confirmed cases. The first change point coincides with state enactment of a travel ban and the resultant containment of imported infections. The second change point coincides with the start of a state-led mass screening and testing programme which has highlighted community-level disease spread that was not well represented in the initial largely traveller based and private laboratory dominated testing data. The results further suggest that due to the likely effect of the national lockdown, community level transmissions are slower than the original imported case driven spread of the disease.</p>
</abstract>
<funding-group>
<funding-statement>RM is supported by the Google PhD fellowship Programme. URL: <ext-link ext-link-type="uri" xlink:href="https://research.google/outreach/phd-fellowship/" xlink:type="simple">https://research.google/outreach/phd-fellowship/</ext-link>. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. No additional funding was received for this study.</funding-statement>
</funding-group>
<counts>
<fig-count count="9"/>
<table-count count="2"/>
<page-count count="16"/>
</counts>
<custom-meta-group>
<custom-meta id="data-availability">
<meta-name>Data Availability</meta-name>
<meta-value>The data underlying the results presented in the study are available from the John Hopkins Coronavirus resource center. URL: <ext-link ext-link-type="uri" xlink:href="https://coronavirus.jhu.edu/map.html" xlink:type="simple">https://coronavirus.jhu.edu/map.html</ext-link>.</meta-value>
</custom-meta>
<custom-meta id="outbreaks">
<meta-name>Outbreaks</meta-name>
<meta-value>COVID-19</meta-value>
</custom-meta>
</custom-meta-group>
</article-meta>
</front>
<body>
<sec id="sec001" sec-type="intro">
<title>Introduction</title>
<p>The first reported case of the novel coronavirus (SARS-CoV-2) in South Africa was announced on 5 March 2020, following the initial manifestation of the virus in Wuhan China in December 2019 [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>–<xref ref-type="bibr" rid="pone.0237126.ref003">3</xref>]. Due to its further spread and the severity of its associated clinical outcomes, the disease was subsequently declared a pandemic by the World Health Organisation (WHO) on 11 March 2020 [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>, <xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>]. In South Africa, by 26 April 2020, 4546 people had been confirmed to have been infected by the coronavirus with 87 fatalities [<xref ref-type="bibr" rid="pone.0237126.ref004">4</xref>].</p>
<p>Numerous states have attempted to minimise the growth in number of COVID-19 infections [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>, <xref ref-type="bibr" rid="pone.0237126.ref005">5</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>]. These attempts are largely based on non-pharmaceutical interventions (NPIs) aimed at separating the infectious population from the susceptible population [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>].</p>
<p>These initiatives aim to strategically reduce the increase in infections to a level where their healthcare systems stand a chance of minimising the number of fatalities [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>]. Some of the critical indicators for policymaker response planning include projections of the infected population, estimates of health care service demand and whether current containment measures are effective [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>].</p>
<p>As the pandemic develops in a rapid and varied manner in most countries, calibration of epidemiological models based on available data can prove to be [<xref ref-type="bibr" rid="pone.0237126.ref007">7</xref>]. This difficulty is further escalated by the high number of asymptomatic cases and the limited testing capacity [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>, <xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>].</p>
<p>A fundamental issue when calibrating localised models is inferring parameters of compartmental models such as susceptible-infectious-recovered (SIR) and the susceptible-exposed-infectious-recovered (SEIR) that are widely used in infectious disease projections. In the view of public health policymakers, a critical aspect of projecting infections is the inference of parameters that align with the underlying trajectories in their jurisdictions. The spreading rate is a parameter of particular interest which is subject to changes due to voluntary social distancing measures and government-imposed contact bans.</p>
<p>The uncertainty in utilising these models is compounded by the limited data in the initial phases and the rapidly changing dynamics due to rapid public policy changes.</p>
<p>To address these complexities, we utilise the Bayesian Framework for the inference of epidemiological model parameters in South Africa. The Bayesian framework allows for both incorporation of prior knowledge and principled embedding of uncertainty in parameter estimation.</p>
<p>In this work we combine Bayesian inference with the compartmental SEIR and SIR models to infer time varying spreading rates that allow for quantification of the impact of government interventions in South Africa.</p>
</sec>
<sec id="sec002" sec-type="materials|methods">
<title>Methods</title>
<sec id="sec003">
<title>Epidemiological modelling</title>
<p>Compartmental models are a class of models that is widely used in epidemiology to model transitions between various stages of disease [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>, <xref ref-type="bibr" rid="pone.0237126.ref008">8</xref>, <xref ref-type="bibr" rid="pone.0237126.ref009">9</xref>]. We now introduce the Susceptible-Exposed-Infectious-Recovered (SEIR) and the related Susceptible-Infectious-Recovered (SIR) compartmental models that have been dominant in COVID-19 modelling literature [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>, <xref ref-type="bibr" rid="pone.0237126.ref005">5</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>].</p>
<sec id="sec004">
<title>The Susceptible-Exposed-Infectious-Recovered Model</title>
<p>The SEIR is an established epidemiological model for the projection of infectious diseases. The SEIR models the transition of individuals between four stages of a condition, namely:</p>
<list list-type="bullet">
<list-item>
<p>being susceptible to the condition,</p>
</list-item>
<list-item>
<p>being infected and in incubation</p>
</list-item>
<list-item>
<p>having the condition and being infectious to others and</p>
</list-item>
<list-item>
<p>having recovered and built immunity for the disease.</p>
</list-item>
</list>
<p>The SEIR can be interpreted as a four-state Markov chain which is illustrated diagrammatically in <xref ref-type="fig" rid="pone.0237126.g001">Fig 1</xref>. The SEIR relies on solving the system of ordinary differential equations below representing the analytic trajectory of the infectious disease [<xref ref-type="bibr" rid="pone.0237126.ref001">1</xref>].
<disp-formula id="pone.0237126.e001"><alternatives><graphic id="pone.0237126.e001g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e001" xlink:type="simple"/><mml:math display="block" id="M1"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mfrac><mml:mrow><mml:mi>d</mml:mi> <mml:mi>S</mml:mi></mml:mrow> <mml:mrow><mml:mi>d</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mtd> <mml:mtd><mml:mrow><mml:mo>=</mml:mo> <mml:mo>-</mml:mo> <mml:mfrac><mml:mrow><mml:mo>λ</mml:mo> <mml:mi>S</mml:mi> <mml:mi>I</mml:mi></mml:mrow> <mml:mi>N</mml:mi></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(1)</label></disp-formula> <disp-formula id="pone.0237126.e002"><alternatives><graphic id="pone.0237126.e002g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e002" xlink:type="simple"/><mml:math display="block" id="M2"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mfrac><mml:mrow><mml:mi>d</mml:mi> <mml:mi>E</mml:mi></mml:mrow> <mml:mrow><mml:mi>d</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mtd> <mml:mtd><mml:mrow><mml:mo>=</mml:mo> <mml:mfrac><mml:mrow><mml:mo>λ</mml:mo> <mml:mi>S</mml:mi> <mml:mi>I</mml:mi></mml:mrow> <mml:mi>N</mml:mi></mml:mfrac> <mml:mo>-</mml:mo> <mml:mi>σ</mml:mi> <mml:mi>E</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(2)</label></disp-formula> <disp-formula id="pone.0237126.e003"><alternatives><graphic id="pone.0237126.e003g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e003" xlink:type="simple"/><mml:math display="block" id="M3"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mfrac><mml:mrow><mml:mi>d</mml:mi> <mml:mi>I</mml:mi></mml:mrow> <mml:mrow><mml:mi>d</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mtd> <mml:mtd><mml:mrow><mml:mo>=</mml:mo> <mml:mi>σ</mml:mi> <mml:mi>E</mml:mi> <mml:mo>-</mml:mo> <mml:mi>μ</mml:mi> <mml:mi>I</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(3)</label></disp-formula> <disp-formula id="pone.0237126.e004"><alternatives><graphic id="pone.0237126.e004g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e004" xlink:type="simple"/><mml:math display="block" id="M4"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mfrac><mml:mrow><mml:mi>d</mml:mi> <mml:mi>R</mml:mi></mml:mrow> <mml:mrow><mml:mi>d</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mtd> <mml:mtd><mml:mrow><mml:mo>=</mml:mo> <mml:mi>μ</mml:mi> <mml:mi>I</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(4)</label></disp-formula>
Where S is the susceptible population, I is the infected population, R is the recovered population and N is the total population where <italic>N</italic> = <italic>S</italic> + <italic>E</italic> + <italic>I</italic> + <italic>R</italic>. λ is the transmission rate, <italic>σ</italic> is the rate at which individuals in incubation become infectious, and <italic>μ</italic> is the recovery rate. 1/<italic>σ</italic> and 1/<italic>μ</italic> therefore, become the incubation period and contagious period respectively.</p>
<fig id="pone.0237126.g001" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g001</object-id>
<label>Fig 1</label>
<caption>
<title>An Illustration of the underlying states of the Susceptible-Exposed-Infectious-Recovered Model(SEIR).</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g001" xlink:type="simple"/>
</fig>
<p>We also consider the Susceptible-Infectious-Recovered (SIR) model which is a subclass of the SEIR model that assumes direct transition from the susceptible compartment to the infected (and infectious) compartment. The SIR is represented by three coupled ordinary differential equations rather than the four in the SEIR. <xref ref-type="fig" rid="pone.0237126.g002">Fig 2</xref> depicts the three states of the SIR model.</p>
<fig id="pone.0237126.g002" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g002</object-id>
<label>Fig 2</label>
<caption>
<title>An Illustration of the underlying states of the Susceptible-Infectious-Recovered Model(SIR).</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g002" xlink:type="simple"/>
</fig>
</sec>
<sec id="sec005">
<title>The basic reproductive number <italic>R</italic><sub>0</sub></title>
<p>The basic reproductive number (<italic>R</italic><sub>0</sub>) represents the mean number of additional infections created by one infectious individual in a susceptible population. According to the latest available literature, without accounting for any social distancing policies the <italic>R</italic><sub>0</sub> for COVID-19 is between 2 and 3.5 [<xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>, <xref ref-type="bibr" rid="pone.0237126.ref011">11</xref>]. <italic>R</italic><sub>0</sub> can be expressed in terms of λ and <italic>μ</italic> as:
<disp-formula id="pone.0237126.e005"><alternatives><graphic id="pone.0237126.e005g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e005" xlink:type="simple"/><mml:math display="block" id="M5"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:msub><mml:mi>R</mml:mi> <mml:mn>0</mml:mn></mml:msub> <mml:mo>=</mml:mo> <mml:mfrac><mml:mo>λ</mml:mo> <mml:mi>μ</mml:mi></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(5)</label></disp-formula></p>
</sec>
<sec id="sec006">
<title>Extensions to the SEIR and SIR models</title>
<p>We use an extended version of the SEIR and SIR models of [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>] that incorporates some of the observed phenomena relating to COVID-19. First we include a delay <italic>D</italic> in becoming infected (<italic>I</italic><sup>new</sup>) and being reported in the confirmed case statistics, such that the confirmed reported cases CR<sub><italic>t</italic></sub> at some time <italic>t</italic> are in the form [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>]:
<disp-formula id="pone.0237126.e006"><alternatives><graphic id="pone.0237126.e006g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e006" xlink:type="simple"/><mml:math display="block" id="M6"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:msub><mml:mtext>CR</mml:mtext> <mml:mi>t</mml:mi></mml:msub> <mml:mo>=</mml:mo> <mml:msubsup><mml:mi>I</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>-</mml:mo> <mml:mi>D</mml:mi></mml:mrow> <mml:mtext>new</mml:mtext></mml:msubsup></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(6)</label></disp-formula></p>
<p>We further assume that the spreading rate λ is time-varying rather than constant with change points that are affected by government interventions and voluntary social distancing measures.</p>
</sec>
</sec>
<sec id="sec007">
<title>Bayesian parameter inference</title>
<p>We follow the framework of [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>] to perform Bayesian inference for model parameters on the South African COVID-19 data. The Bayesian framework allows for the posterior inference of parameters which updates prior beliefs based on a data-driven likelihood. The posterior inference is governed by Bayes theorem as follows:
<disp-formula id="pone.0237126.e007"><alternatives><graphic id="pone.0237126.e007g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e007" xlink:type="simple"/><mml:math display="block" id="M7"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>P</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mo>=</mml:mo> <mml:mfrac><mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>D</mml:mi> <mml:mo>|</mml:mo> <mml:mi>W</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo> <mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>D</mml:mi> <mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(7)</label></disp-formula></p>
<p>Where <italic>P</italic>(<italic>W</italic>|<italic>D</italic>, <italic>M</italic>) is the posterior distribution of a vector of model parameters (<italic>W</italic>) given the model(M) and observed data(D), <italic>P</italic>(<italic>D</italic>|<italic>W</italic>, <italic>M</italic>) is the data likelihood and <italic>P</italic>(<italic>D</italic>) is the evidence.</p>
<sec id="sec008">
<title>The likelihood</title>
<p>The Likelihood indicates the probability of observing the reported case data given the assumed model. In our study, we adopt the Student-T distribution as the Likelihood as suggested by [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>]. Similar to a Gaussian likelihood, the Student-T likelihood allows for parameter updates that minimise discrepancies between the predicted and observed reported cases.</p>
</sec>
<sec id="sec009">
<title>Priors</title>
<p>Parameter prior distributions encode some prior subject matter knowledge into parameter estimation. In the case of epidemiological model parameters, priors incorporate literature based expected values of parameters such as recovery rate(<italic>μ</italic>), spreading rate(λ), change points based on policy interventions etc.</p>
<p>The prior settings for the model parameters are listed in <xref ref-type="table" rid="pone.0237126.t001">Table 1</xref>. We follow [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>] by selecting LogNormal distributions for λ and <italic>σ</italic> such that the initial mean basic reproductive number is 3.2 which is consistent with literature [<xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>, <xref ref-type="bibr" rid="pone.0237126.ref005">5</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>, <xref ref-type="bibr" rid="pone.0237126.ref012">12</xref>]. We set a LogNormal prior for the <italic>σ</italic> such that the mean incubation period is five days. We use the history of government interventions to set priors on change points in the spreading rate. The priors on change-points include 19/03/2020 when a travel ban and school closures were announced, and 28/03/2020 when a national lockdown was enforced. We keep the priors for the Lognormal distributions of the spreading rates after the change points weakly-informative by setting the same mean as λ<sub>0</sub> and higher variances across all change points. This has the effect of placing greater weight on the data driven likelihood. Similar to [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>] we adopt weakly-informative Half-Cauchy priors for the initial conditions for the infected and exposed populations.</p>
<table-wrap id="pone.0237126.t001" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.t001</object-id>
<label>Table 1</label>
<caption>
<title>Prior distribution settings for SEIR and SIR model parameters.</title>
</caption>
<alternatives>
<graphic id="pone.0237126.t001g" mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.t001" xlink:type="simple"/>
<table border="0" frame="box" rules="all">
<colgroup>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
</colgroup>
<thead>
<tr>
<th align="left" style="border-bottom:thick">Parameter</th>
<th align="left" style="border-bottom:thick">Prior Distribution</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Spreading rate λ<sub>0</sub></td>
<td align="left">LogNormal(log(0.4),0.5)</td>
</tr>
<tr>
<td align="left">Spreading rate λ<sub>1</sub></td>
<td align="left">LogNormal(log(0.4),0.7)</td>
</tr>
<tr>
<td align="left">Spreading rate λ<sub>2</sub></td>
<td align="left">LogNormal(log(0.4),0.7)</td>
</tr>
<tr>
<td align="left">Incubation to infectious rate <italic>σ</italic></td>
<td align="left">LogNormal(log(1/5),0.5)</td>
</tr>
<tr>
<td align="left">Recovery rate <italic>μ</italic></td>
<td align="left">LogNormal(log(1/8),0.2)</td>
</tr>
<tr>
<td align="left">Reporting Delay <italic>D</italic></td>
<td align="left">LogNormal(log(8),0.2)</td>
</tr>
<tr>
<td align="left">Initial Infectious <italic>I</italic><sub>0</sub></td>
<td align="left">Half-Cauchy(20)</td>
</tr>
<tr>
<td align="left">Initial Exposed <italic>E</italic><sub>0</sub></td>
<td align="left">Half-Cauchy(20)</td>
</tr>
<tr>
<td align="left">Change Point <italic>t</italic><sub>1</sub></td>
<td align="left">Normal(2020/03/18,1)</td>
</tr>
<tr>
<td align="left">Change Point <italic>t</italic><sub>2</sub></td>
<td align="left">Normal(2020/03/28,1)</td>
</tr>
</tbody>
</table>
</alternatives>
</table-wrap>
</sec>
<sec id="sec010">
<title>Markov Chain Monte Carlo (MCMC)</title>
<p>Given that the closed-form inference of the posterior distributions on the parameters listed in <xref ref-type="table" rid="pone.0237126.t001">Table 1</xref> is infeasible, we make use of Markov Chain Monte Carlo to sample from the posterior. Monte Carlo methods approximate solutions to complex numerical problems by simulating a random process. MCMC uses a Markov Chain to sample from the posterior distribution, where a Markov Chain is a sequence of random variables <italic>W</italic><sub><italic>t</italic></sub> such that:
<disp-formula id="pone.0237126.e008"><alternatives><graphic id="pone.0237126.e008g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e008" xlink:type="simple"/><mml:math display="block" id="M8"><mml:mrow><mml:mi>P</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>+</mml:mo> <mml:mn>1</mml:mn></mml:mrow></mml:msub> <mml:mo>|</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mn>1</mml:mn></mml:msub> <mml:mo>,</mml:mo> <mml:mo>.</mml:mo> <mml:mo>.</mml:mo> <mml:mo>.</mml:mo> <mml:mo>,</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mi>t</mml:mi></mml:msub> <mml:mo>)</mml:mo></mml:mrow> <mml:mo>=</mml:mo> <mml:mi>P</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>+</mml:mo> <mml:mn>1</mml:mn></mml:mrow></mml:msub> <mml:mo>|</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mi>t</mml:mi></mml:msub> <mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></alternatives></disp-formula></p>
<p>MCMC techniques have been widely used in COVID-19 parameter inference [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>]. In this work, we explore inference using Metropolis-Hastings (MH), Slice Sampling and No-U-Turn Sampler (NUTS).</p>
</sec>
<sec id="sec011">
<title>Metropolis Hastings (MH)</title>
<p>MH is one of the simplest algorithms for generating a Markov Chain which converges to the correct stationary distribution. The MH generates proposed samples using a proposal distribution. A new parameter state <italic>W</italic><sub><italic>t</italic>*</sub> is accepted or rejected probabilistically based on the posterior likelihood ratio:
<disp-formula id="pone.0237126.e009"><alternatives><graphic id="pone.0237126.e009g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e009" xlink:type="simple"/><mml:math display="block" id="M9"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>a</mml:mi> <mml:mi>c</mml:mi> <mml:mi>c</mml:mi> <mml:mi>e</mml:mi> <mml:mi>p</mml:mi> <mml:mi>t</mml:mi> <mml:mo>(</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>*</mml:mo></mml:mrow></mml:msub> <mml:mo>)</mml:mo> <mml:mo>)</mml:mo> <mml:mo>=</mml:mo> <mml:mi>m</mml:mi> <mml:mi>i</mml:mi> <mml:mi>n</mml:mi> <mml:mo>(</mml:mo> <mml:mn>1</mml:mn> <mml:mo>,</mml:mo> <mml:mfrac><mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:msub><mml:mi>W</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>*</mml:mo></mml:mrow></mml:msub> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:msup><mml:mi>W</mml:mi> <mml:mrow><mml:mi>t</mml:mi> <mml:mo>-</mml:mo> <mml:mn>1</mml:mn></mml:mrow></mml:msup> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo></mml:mrow></mml:mfrac> <mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(8)</label></disp-formula></p>
<p>A common proposal distribution is a symmetric random walk obtained by adding Gaussian noise to a previously accepted parameter state. Random walk behaviour of such a proposal typically results in low sample acceptance rates.</p>
</sec>
<sec id="sec012">
<title>Slice sampling</title>
<p>Slice sampling facilitates sampling from the posterior distribution <italic>P</italic>(<italic>W</italic>|<italic>D</italic>, <italic>M</italic>) by adding an auxiliary variable <italic>u</italic> such that the joint posterior distribution becomes:
<disp-formula id="pone.0237126.e010"><alternatives><graphic id="pone.0237126.e010g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e010" xlink:type="simple"/><mml:math display="block" id="M10"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>P</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>,</mml:mo> <mml:mi>u</mml:mi> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mo>=</mml:mo> <mml:mo>{</mml:mo> <mml:mtable><mml:mtr><mml:mtd columnalign="left"><mml:mfrac><mml:mn>1</mml:mn> <mml:mi>Z</mml:mi></mml:mfrac></mml:mtd> <mml:mtd columnalign="left"><mml:mrow><mml:mspace width="4pt"/><mml:mrow><mml:mn>0</mml:mn> <mml:mo>≤</mml:mo> <mml:mi>U</mml:mi> <mml:mo>≤</mml:mo> <mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>M</mml:mi> <mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr> <mml:mtr><mml:mtd columnalign="left"><mml:mn>0</mml:mn></mml:mtd> <mml:mtd columnalign="left"><mml:mtext>Otherwise</mml:mtext></mml:mtd></mml:mtr></mml:mtable> <mml:mo/></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(9)</label></disp-formula></p>
<p>Where <italic>Z</italic> = ∫<italic>P</italic>(<italic>W</italic>|<italic>D</italic>, <italic>M</italic>)<italic>dW</italic> which is a normalisation constant. Marginal samples for the parameters W can then be obtained by ignoring <italic>u</italic> samples from the joint samples. This process corresponds to sampling above the slice of the posterior density function around a predefined window. <xref ref-type="fig" rid="pone.0237126.g003">Fig 3</xref> shows an illustration of slice sampling.</p>
<fig id="pone.0237126.g003" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g003</object-id>
<label>Fig 3</label>
<caption>
<title>An illustration of slice sampling, moving from a parameter sample w(i) to w(i + 1) via auxiliary variable sample u(i + 1).</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g003" xlink:type="simple"/>
</fig>
<p>While sample acceptance is guaranteed with slice sampling, a large slice window can lead to computationally inefficient sampling while a small window can lead to poor mixing.</p>
</sec>
<sec id="sec013">
<title>Hybrid Monte Carlo (HMC) and the No-U-Turn Sampler (NUTS)</title>
<p>Metropolis-Hastings (MH) and slice sampling tend to exhibit excessive random walk behaviour—where the next state of the Markov Chain is randomly proposed from a proposal distribution [<xref ref-type="bibr" rid="pone.0237126.ref013">13</xref>–<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>]. This results in low proposal acceptance rates and small effective sample sizes.</p>
<p>HMC proposed by [<xref ref-type="bibr" rid="pone.0237126.ref016">16</xref>] reduces random walk behaviour by adding auxiliary momentum variables to the parameter space [<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>]. HMC creates a vector field around the current state using gradient information, which assigns the current state a trajectory towards a high probability next state [<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>]. The dynamical system formed by the model parameters <italic>W</italic> and the auxiliary momentum variables <italic>p</italic> is represented by the Hamiltonian <italic>H</italic>(<italic>W</italic>, <italic>p</italic>) written as follows [<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>, <xref ref-type="bibr" rid="pone.0237126.ref016">16</xref>]:
<disp-formula id="pone.0237126.e011"><alternatives><graphic id="pone.0237126.e011g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e011" xlink:type="simple"/><mml:math display="block" id="M11"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>H</mml:mi> <mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>,</mml:mo> <mml:mi>p</mml:mi> <mml:mo>)</mml:mo> <mml:mo>=</mml:mo> <mml:mi>M</mml:mi> <mml:mo>(</mml:mo> <mml:mi>W</mml:mi> <mml:mo>)</mml:mo> <mml:mo>+</mml:mo> <mml:mi>K</mml:mi> <mml:mo>(</mml:mo> <mml:mi>p</mml:mi> <mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(10)</label></disp-formula></p>
<p>Where <italic>M</italic>(<italic>W</italic>) is the negative log-likelihood of the posterior distribution in <xref ref-type="disp-formula" rid="pone.0237126.e007">Eq 7</xref>, also referred to as the potential energy. <italic>K</italic>(<italic>p</italic>) is the kinetic energy defined by the kernel of a Gaussian with a covariance matrix <italic>M</italic> [<xref ref-type="bibr" rid="pone.0237126.ref017">17</xref>]:
<disp-formula id="pone.0237126.e012"><alternatives><graphic id="pone.0237126.e012g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e012" xlink:type="simple"/><mml:math display="block" id="M12"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>K</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:mi>p</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mo>=</mml:mo> <mml:mfrac><mml:mrow><mml:msup><mml:mi>p</mml:mi> <mml:mi>T</mml:mi></mml:msup> <mml:msup><mml:mi>M</mml:mi> <mml:mrow><mml:mo>-</mml:mo> <mml:mn>1</mml:mn></mml:mrow></mml:msup> <mml:mi>p</mml:mi></mml:mrow> <mml:mn>2</mml:mn></mml:mfrac> <mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(11)</label></disp-formula></p>
<p>The trajectory vector field is defined by considering the parameter space as a physical system that follows Hamiltonian Dynamics [<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>]. The dynamical equations governing the trajectory of the chain are then defined by Hamiltonian equations at a fictitious time <italic>t</italic> as follows [<xref ref-type="bibr" rid="pone.0237126.ref016">16</xref>]:
<disp-formula id="pone.0237126.e013"><alternatives><graphic id="pone.0237126.e013g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e013" xlink:type="simple"/><mml:math display="block" id="M13"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>∂</mml:mi> <mml:msub><mml:mi>w</mml:mi> <mml:mi>i</mml:mi></mml:msub></mml:mrow> <mml:mrow><mml:mi>∂</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac> <mml:mo>=</mml:mo> <mml:mfrac><mml:mrow><mml:mi>∂</mml:mi> <mml:mi>H</mml:mi></mml:mrow> <mml:mrow><mml:mi>∂</mml:mi> <mml:msub><mml:mi>p</mml:mi> <mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(12)</label></disp-formula> <disp-formula id="pone.0237126.e014"><alternatives><graphic id="pone.0237126.e014g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e014" xlink:type="simple"/><mml:math display="block" id="M14"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>∂</mml:mi> <mml:msub><mml:mi>p</mml:mi> <mml:mi>i</mml:mi></mml:msub></mml:mrow> <mml:mrow><mml:mi>∂</mml:mi> <mml:mi>t</mml:mi></mml:mrow></mml:mfrac> <mml:mo>=</mml:mo> <mml:mo>-</mml:mo> <mml:mfrac><mml:mrow><mml:mi>∂</mml:mi> <mml:mi>H</mml:mi></mml:mrow> <mml:mrow><mml:mi>∂</mml:mi> <mml:msub><mml:mi>w</mml:mi> <mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(13)</label></disp-formula></p>
<p>In practical terms, the dynamical trajectory is discretised using the leapfrog integrator. In the leapfrog integrator to reach the next point in the path, we take half a step in the momentum direction, followed by a full step in the direction of the model parameters—then ending with another half step in the momentum direction.</p>
<p>Due to the discretising errors arising from leapfrog integration a Metropolis acceptance step is then performed in order to accept or reject the new sample proposed by the trajectory [<xref ref-type="bibr" rid="pone.0237126.ref015">15</xref>, <xref ref-type="bibr" rid="pone.0237126.ref018">18</xref>]. In the Metropolis step the parameters proposed by the HMC trajectory <italic>w</italic>* are accepted with the probability [<xref ref-type="bibr" rid="pone.0237126.ref016">16</xref>]:
<disp-formula id="pone.0237126.e015"><alternatives><graphic id="pone.0237126.e015g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e015" xlink:type="simple"/><mml:math display="block" id="M15"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd columnalign="right"><mml:mrow><mml:mi>P</mml:mi> <mml:mrow><mml:mo>(</mml:mo> <mml:mi>a</mml:mi> <mml:mi>c</mml:mi> <mml:mi>c</mml:mi> <mml:mi>e</mml:mi> <mml:mi>p</mml:mi> <mml:mi>t</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mo>=</mml:mo> <mml:mo form="prefix" movablelimits="true">min</mml:mo> <mml:mo>(</mml:mo> <mml:mn>1</mml:mn> <mml:mo>,</mml:mo> <mml:mfrac><mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:msup><mml:mi>w</mml:mi> <mml:mo>*</mml:mo></mml:msup> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>α</mml:mi> <mml:mo>,</mml:mo> <mml:mi>β</mml:mi> <mml:mo>,</mml:mo> <mml:mi>H</mml:mi> <mml:mo>)</mml:mo></mml:mrow> <mml:mrow><mml:mi>P</mml:mi> <mml:mo>(</mml:mo> <mml:mi>w</mml:mi> <mml:mo>|</mml:mo> <mml:mi>D</mml:mi> <mml:mo>,</mml:mo> <mml:mi>α</mml:mi> <mml:mo>,</mml:mo> <mml:mi>β</mml:mi> <mml:mo>,</mml:mo> <mml:mi>H</mml:mi> <mml:mo>)</mml:mo></mml:mrow></mml:mfrac> <mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></alternatives> <label>(14)</label></disp-formula></p>
<p>Algorithm 1 shows the pseudo-code for the HMC where <italic>ϵ</italic> is a discretisation stepsize. The leapfrog steps are repeated until the maximum trajectory length <italic>L</italic> is reached.</p>
<p><bold>Algorithm 1</bold>: Hybrid Monte Carlo Algorithm</p>
<p specific-use="line"><bold>Data</bold>: Confirmed Cases dataset {<bold>C</bold><sup>(<italic>t</italic>)</sup>}</p>
<p specific-use="line"><bold>Result</bold>: <italic>N</italic> Samples of model parameters <bold>W</bold></p>
<p specific-use="line"><bold>for</bold> <italic>n</italic> ← 1 <bold>to</bold> <italic>N</italic> <bold>do</bold></p>
<p specific-use="line"> <italic>w</italic><sub>0</sub> ← <italic>w</italic><sub>init</sub></p>
<p specific-use="line"> <italic>sample the auxiliary momentum variables p</italic></p>
<p specific-use="line"> 
<inline-formula id="pone.0237126.e016">
<alternatives>
<graphic id="pone.0237126.e016g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e016" xlink:type="simple"/>
<mml:math display="inline" id="M16">
<mml:mrow>
<mml:mtext>p</mml:mtext>
<mml:mo>∼</mml:mo>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mo>(</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">M</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:math>
</alternatives>
</inline-formula>
</p>
<p specific-use="line"> Use leapfrog steps to generate proposals for <italic>w</italic></p>
<p specific-use="line"> <bold>for</bold> <italic>t</italic> ← 1 <bold>to</bold> <italic>L</italic> <bold>do</bold></p>
<p specific-use="line">  
<disp-formula id="pone.0237126.e017">
<alternatives>
<graphic id="pone.0237126.e017g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e017" xlink:type="simple"/>
<mml:math display="block" id="M17">
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>←</mml:mo>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>∂</mml:mi>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>∂</mml:mi>
<mml:mi>w</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>(</mml:mo>
<mml:mi>w</mml:mi>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:math>
</alternatives>
</disp-formula>
</p>
<p specific-use="line">  
<disp-formula id="pone.0237126.e018">
<alternatives>
<graphic id="pone.0237126.e018g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e018" xlink:type="simple"/>
<mml:math display="block" id="M18">
<mml:mrow>
<mml:mi>w</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>←</mml:mo>
<mml:mi>w</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mfrac>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mi>M</mml:mi>
</mml:mfrac>
</mml:mrow>
</mml:math>
</alternatives>
</disp-formula>
</p>
<p specific-use="line">  
<disp-formula id="pone.0237126.e019">
<alternatives>
<graphic id="pone.0237126.e019g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e019" xlink:type="simple"/>
<mml:math display="block" id="M19">
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>←</mml:mo>
<mml:mi>p</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:mo>(</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>∂</mml:mi>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>∂</mml:mi>
<mml:mi>w</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>(</mml:mo>
<mml:mi>w</mml:mi>
<mml:mo>(</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mi>ϵ</mml:mi>
<mml:mo>)</mml:mo>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:math>
</alternatives>
</disp-formula>
</p>
<p specific-use="line"> <bold>end</bold></p>
<p specific-use="line"> <italic>Metropolis Update step</italic>:</p>
<p specific-use="line"> (<italic>p</italic>, <italic>w</italic>)<sub><italic>n</italic></sub> ← (<italic>p</italic>(<italic>L</italic>), <italic>w</italic>(<italic>L</italic>)) with probability:</p>
<p specific-use="line"> 
<disp-formula id="pone.0237126.e020">
<alternatives>
<graphic id="pone.0237126.e020g" mimetype="image" position="anchor" xlink:href="info:doi/10.1371/journal.pone.0237126.e020" xlink:type="simple"/>
<mml:math display="block" id="M20">
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mi>i</mml:mi>
<mml:mi>n</mml:mi>
<mml:mo>(</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>P</mml:mi>
<mml:mo>(</mml:mo>
<mml:msub>
<mml:mi>w</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>*</mml:mo>
</mml:mrow>
</mml:msub>
<mml:mo>|</mml:mo>
<mml:mi>D</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>P</mml:mi>
<mml:mo>(</mml:mo>
<mml:mi>w</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>D</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>)</mml:mo>
</mml:mrow>
</mml:math>
</alternatives>
</disp-formula>
</p>
<p specific-use="line"><bold>end</bold></p>
<p>The HMC algorithm has multiple parameters that require tuning for efficient sampling, such as the step size and the trajectory length. In terms of trajectory length, a trajectory length that is too short leads to random walk behaviour similar to MH. While a trajectory length that is too long results in a trajectory that inefficiently traces back.</p>
<p>The stepsize is also a critical parameter for sampling, small stepsizes are computationally inefficient leading to correlated samples and poor mixing while large stepsizes compound discretisation errors leading to low acceptance rates. Tuning these parameters requires multiple time consuming trial runs.</p>
<p>NUTS automates the tuning of the leapfrog stepsize and trajectory length. In NUTS the stepsize is tuned during an initial burn-in phase by targeting particular levels of sample acceptance. The trajectory length is tuned by iteratively adding steps until either the chain starts to trace back (U-turn) or the Hamiltonian explodes (becomes infinite).</p>
<p>We use the samplers described above to calibrate the SEIR and SIR models on daily new cases and cumulative cases data for South Africa up to and including 20 April 2020 provided by Johns Hopkins University’s Center for Systems Science and Engineering(CSSE) [<xref ref-type="bibr" rid="pone.0237126.ref003">3</xref>].</p>
</sec>
</sec>
</sec>
<sec id="sec014" sec-type="results">
<title>Results</title>
<p>SIR and SEIR model parameter inference was performed using confirmed cases data up to and including 20 April 2020 and MCMC samplers described in the methodology section. Each of the samplers are run such that 5000 samples are drawn with 1000 burn-in and tuning steps. We use leave-one-out(LOO) cross-validation error of [<xref ref-type="bibr" rid="pone.0237126.ref019">19</xref>] to evaluate the goodness of fit of each model.</p>
<p><xref ref-type="table" rid="pone.0237126.t002">Table 2</xref> shows the LOO validation errors of the various models. It can be seen that the SIR model with two change points as the best model fit with the lowest mean LOO of 448.00. The SEIR model with two change points showed a mean LOO of 459.94. We note that [<xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>] similarly finds that the SIR model displayed superior goodness of fit to the SEIR on German data.</p>
<table-wrap id="pone.0237126.t002" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.t002</object-id>
<label>Table 2</label>
<caption>
<title>Leave-one out (LOO) statistics comparing SEIR and SIR models with different number of change points.</title>
</caption>
<alternatives>
<graphic id="pone.0237126.t002g" mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.t002" xlink:type="simple"/>
<table border="0" frame="box" rules="all">
<colgroup>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
<col align="left" valign="middle"/>
</colgroup>
<thead>
<tr>
<th align="left" style="border-bottom:thick">Model</th>
<th align="left" style="border-bottom:thick">Change Points</th>
<th align="left" style="border-bottom:thick">LOO</th>
<th align="left" style="border-bottom:thick">Effective Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">SIR</td>
<td align="left">2</td>
<td align="char" char=".">448.00</td>
<td align="char" char=".">10.27</td>
</tr>
<tr>
<td align="left">SEIR</td>
<td align="left">1</td>
<td align="char" char=".">457.77</td>
<td align="char" char=".">11.60</td>
</tr>
<tr>
<td align="left">SEIR</td>
<td align="left">2</td>
<td align="char" char=".">459.94</td>
<td align="char" char=".">12.00</td>
</tr>
<tr>
<td align="left">SIR</td>
<td align="left">1</td>
<td align="char" char=".">463.03</td>
<td align="char" char=".">8.51</td>
</tr>
<tr>
<td align="left">SEIR</td>
<td align="left">0</td>
<td align="char" char=".">464.69</td>
<td align="char" char=".">16.14</td>
</tr>
<tr>
<td align="left">SIR</td>
<td align="left">0</td>
<td align="char" char=".">517.72</td>
<td align="char" char=".">4.72</td>
</tr>
</tbody>
</table>
</alternatives>
</table-wrap>
<p>We now further present detailed results of the SIR and SEIR models with inference using NUTS, the trace plots from these models indicating stationarity in the sampling chains are provided in <xref ref-type="supplementary-material" rid="pone.0237126.s002">S2</xref> and <xref ref-type="supplementary-material" rid="pone.0237126.s005">S5</xref> Figs. The trace plots for the SIR and SEIR models using MH are provided in <xref ref-type="supplementary-material" rid="pone.0237126.s003">S3</xref> and <xref ref-type="supplementary-material" rid="pone.0237126.s006">S6</xref> Figs, while similar trace plots for slice sampling are provided in <xref ref-type="supplementary-material" rid="pone.0237126.s004">S4</xref> and <xref ref-type="supplementary-material" rid="pone.0237126.s007">S7</xref> Figs. The trace plots largely indicate that the NUTS sampler displays greater agreement between parallel chains thus lower rhat values.</p>
<sec id="sec015">
<title>Posterior parameter distributions</title>
<p><xref ref-type="fig" rid="pone.0237126.g004">Fig 4</xref> shows the posterior distributions of the SIR model parameters. The parameter estimates are λ<sub>0</sub> ≈ 0.495 (CI[0.41, 0.564]), λ<sub>1</sub> ≈ 0.099 (CI[0.065, 0.145]), λ<sub>2</sub> ≈ 0.197 (CI[0.134, 0.264]), <italic>μ</italic> ≈ 0.151 (CI[0.09, 0.205]) and reporting delay (<italic>D</italic>) ≈ 6.848 (CI[5.178, 8.165]). This corresponds to <italic>R</italic><sub>0</sub> values of 3.278 (CI[2.715, 3.73]), 0.655 (CI[0.430, 0.960]) and 1.304 (CI[0.887, 1.7748]) at the respective change points. <xref ref-type="supplementary-material" rid="pone.0237126.s001">S1 Fig</xref> further shows the joint posterior distributions of λ<sub><italic>t</italic></sub> and <italic>μ</italic> at each of the change points.</p>
<fig id="pone.0237126.g004" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g004</object-id>
<label>Fig 4</label>
<caption>
<title>Posterior parameter distributions for the SIR model with two change points.</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g004" xlink:type="simple"/>
</fig>
<p>Time-varying spread rates allow for inference of the impact of various state and societal interventions on the spreading rate. <xref ref-type="fig" rid="pone.0237126.g005">Fig 5</xref> shows the fit and projections based on SIR models with zero, one and two change points. As can be seen from the plot the two change point model best captures the trajectory in the development of new cases relative to the zero and one change point models. The superior goodness of fit of the two change point model is also illustrated in <xref ref-type="table" rid="pone.0237126.t002">Table 2</xref>. The fit and projections showing similar behaviour on the SEIR model with various change points are shown in <xref ref-type="fig" rid="pone.0237126.g006">Fig 6</xref>.</p>
<fig id="pone.0237126.g005" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g005</object-id>
<label>Fig 5</label>
<caption>
<title>Predictions and actual data(until 20 April 2020) based on SIR models with various change points.</title>
<p>The top plot indicates the actual and projected new cases while the bottom plot shows the actual and projected cumulative cases.</p>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g005" xlink:type="simple"/>
</fig>
<fig id="pone.0237126.g006" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g006</object-id>
<label>Fig 6</label>
<caption>
<title>Predictions and actual data(until 20 April 2020) based on SEIR models with various change points.</title>
<p>The top plot indicates the actual and projected new cases while the bottom plot shows the actual and projected cumulative cases.</p>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g006" xlink:type="simple"/>
</fig>
</sec>
<sec id="sec016">
<title>Reporting delays, incubation and infectious period</title>
<p>The mean reporting delay time in days was found to be 6.848 (CI[5.178, 8.165]), literature suggests this delay includes both the incubation period and the test reporting lags. The posterior distribution incubation period from the SEIR model in <xref ref-type="fig" rid="pone.0237126.g007">Fig 7</xref> yields a median incubation period of 4.537 days (CI[2.499, 6.787]). Thus suggesting a mean laboratory reporting delay of approximately 2.311 days. A mean recovery rate <italic>μ</italic> ≈ 0.151 implies mean infectious period of 6.620 days which is in line with related literature [<xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>].</p>
<fig id="pone.0237126.g007" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g007</object-id>
<label>Fig 7</label>
<caption>
<title>Posterior parameter distributions under SEIR model with two change points.</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g007" xlink:type="simple"/>
</fig>
</sec>
<sec id="sec017">
<title>Timing and impact of interventions</title>
<p><xref ref-type="fig" rid="pone.0237126.g008">Fig 8</xref> depicts the posterior distributions of the spreading rates and times corresponding to each change point. We observe that the first change point is on a mean date of 18 March 2020 (CI:[16/03/2020, 20/03/2020]). This date is consistent with the travel ban, school closures and social distancing recommendations. This change point resulted in a substantial decrease in the spreading rate (80%) primarily due to the reduction in imported infections.</p>
<fig id="pone.0237126.g008" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g008</object-id>
<label>Fig 8</label>
<caption>
<title>Posterior distributions of the spreading rates(λ<sub><italic>t</italic></sub>) and the corresponding distributions of the time points.</title>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g008" xlink:type="simple"/>
</fig>
<p>The second change point is observed on 28 March 2020 (CI:[26/03/2020, 30/03/2020]). This time point coincides with the announcement of mass screening and testing by the government on 30 March 2020. The resulting mean <italic>R</italic><sub>0</sub> of 1.304 implies a 60% decrease from the initial value.</p>
<p>The inference of parameters is dependent on the underlying testing processes that generate the confirmed case data. The effect of the mass screening and testing campaign was to change the underlying confirmed case data generating process by widening the criteria of those eligible for testing. While initial testing focused on individuals that either had exposure to known cases or travelled to known COVID-19 affected countries, mass screening and testing further introduced detection of community level transmissions which may contain undocumented contact and exposure to COVID-19 positive individuals.</p>
</sec>
</sec>
<sec id="sec018" sec-type="conclusions">
<title>Discussion</title>
<p>We have performed Bayesian parameter inference of the SIR and SEIR models using MCMC and publicly available data as at 20 April 2020. The resulting parameter estimates fall in-line with the existing literature in-terms of mean baseline <italic>R</italic><sub>0</sub> (before government action), mean incubation time and mean infectious period [<xref ref-type="bibr" rid="pone.0237126.ref002">2</xref>, <xref ref-type="bibr" rid="pone.0237126.ref005">5</xref>, <xref ref-type="bibr" rid="pone.0237126.ref006">6</xref>, <xref ref-type="bibr" rid="pone.0237126.ref010">10</xref>].</p>
<p>We find that initial government action that mainly included a travel ban, school closures and stay-home orders resulted in a mean decline of 80% in the spreading rate. Further government action through mass screening and testing campaigns resulted in a second trajectory change point. This latter change point is mainly driven by the widening of the population eligible for testing, from travellers (and their known contacts) to include the generalised community who would have probably not afforded private lab testing which dominated the initial data. This resulted in an increase of <italic>R</italic><sub>0</sub> to 1.304. The effect of mass screening and testing can also be seen in <xref ref-type="fig" rid="pone.0237126.g009">Fig 9</xref> indicating a mean increase in daily tests preformed from 1639 to 4374.</p>
<fig id="pone.0237126.g009" position="float">
<object-id pub-id-type="doi">10.1371/journal.pone.0237126.g009</object-id>
<label>Fig 9</label>
<caption>
<title>Daily COVID-19 tests performed in South Africa.</title>
<p>The orange line indicates the segmented mean number of tests per day before and after the 28 March 2020 change point.</p>
</caption>
<graphic mimetype="image" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.g009" xlink:type="simple"/>
</fig>
<p>The second change point illustrates the possible existence of multiple pandemics, as suggested by [<xref ref-type="bibr" rid="pone.0237126.ref020">20</xref>]. Thus testing after 28 March is more indicative of community-level transmissions that were possibly not as well documented in-terms of contact tracing and isolation relative to the initial imported infection driven pandemic. This is also supported by the documented increase in public laboratory testing (relative to private) past this change point, suggesting health care access might also play a role in the detection of community-level infections [<xref ref-type="bibr" rid="pone.0237126.ref021">21</xref>].</p>
</sec>
<sec id="sec019" sec-type="conclusions">
<title>Conclusion</title>
<p>We have utilised a Bayesian inference framework to infer time-varying spreading rates of COVID-19 in South Africa. The time-varying spreading rates allow us to estimate the effects of government actions on the dynamics of the pandemic.</p>
<p>The results indicate a decrease in the mean spreading rate of 60%, which mainly coincides with the containment of imported infections, school closures and stay at home orders.</p>
<p>The results also indicate the emergence of community-level infections which are increasingly being highlighted by the mass screening and testing campaign. The development of the community level transmissions (<italic>R</italic><sub>0</sub> ≈ 1.3041 (CI[0.887, 1.7748])) of the pandemic at the time of publication appears to be slower than that of the initial traveller based pandemic (<italic>R</italic><sub>0</sub> ≈ 3.278 (CI[2.715, 3.73])).</p>
<p>A future improvement to this work could include extensions to regional and provincial studies as current data suggests varied spreading rates both regionally and provincially. As more government interventions come to play priors on more change points might also be necessary.</p>
</sec>
<sec id="sec020">
<title>Supporting information</title>
<supplementary-material id="pone.0237126.s001" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s001" xlink:type="simple">
<label>S1 Fig</label>
<caption>
<title>Two dimensional heat maps of the joint posterior distributions of the spreading rate(λ) and the recovery rate(<italic>μ</italic>) at various change points of the SIR model.</title>
<p>The high joint density areas (in yellow) indicate likely values of <italic>R</italic><sub>0</sub>. The baseline mean <italic>R</italic><sub>0</sub> estimate in S1 Fig (a) is 3.278, the first change point estimate in Fig S1 Fig (b) is 0.655 while the second change point in S1 Fig (c) has resulted in a mean <italic>R</italic><sub>0</sub> estimate of 1.304.</p>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s002" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s002" xlink:type="simple">
<label>S2 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SIR model inferred using NUTS.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s003" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s003" xlink:type="simple">
<label>S3 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SIR model inferred using MH.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s004" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s004" xlink:type="simple">
<label>S4 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SIR model inferred using slice sampling.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s005" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s005" xlink:type="simple">
<label>S5 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SEIR model inferred using NUTS.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s006" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s006" xlink:type="simple">
<label>S6 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SEIR model inferred using MH.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
<supplementary-material id="pone.0237126.s007" mimetype="image/tiff" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s007" xlink:type="simple">
<label>S7 Fig</label>
<caption>
<title>Shows diagnostic trace plots for the SEIR model inferred using slice sampling.</title>
<p>(TIFF)</p>
</caption>
</supplementary-material>
</sec>
</body>
<back>
<ref-list>
<title>References</title>
<ref id="pone.0237126.ref001">
<label>1</label>
<mixed-citation publication-type="other" xlink:type="simple">Mbuvha R, Marwala T. On Data-Driven Management of the COVID-19 Outbreak in South Africa. medRxiv. 2020;.</mixed-citation>
</ref>
<ref id="pone.0237126.ref002">
<label>2</label>
<mixed-citation publication-type="other" xlink:type="simple">WHO. Report of the WHO-China Joint Mission on Coronavirus Disease 2019 (COVID-19); 2020. Available from: <ext-link ext-link-type="uri" xlink:href="https://www.who.int/docs/default-source/coronaviruse/who-china-joint-mission-on-covid-19-final-report.pdf" xlink:type="simple">https://www.who.int/docs/default-source/coronaviruse/who-china-joint-mission-on-covid-19-final-report.pdf</ext-link>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref003">
<label>3</label>
<mixed-citation publication-type="journal" xlink:type="simple">
<name name-style="western"><surname>Dong</surname> <given-names>E</given-names></name>, <name name-style="western"><surname>Du</surname> <given-names>H</given-names></name>, <name name-style="western"><surname>Gardner</surname> <given-names>L</given-names></name>. <article-title>An interactive web-based dashboard to track COVID-19 in real time</article-title>. <source>The Lancet infectious diseases</source>. <year>2020</year>;<volume>20</volume>(<issue>5</issue>):<fpage>533</fpage>–<lpage>534</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/S1473-3099(20)30120-1" xlink:type="simple">10.1016/S1473-3099(20)30120-1</ext-link></comment> <object-id pub-id-type="pmid">32087114</object-id></mixed-citation>
</ref>
<ref id="pone.0237126.ref004">
<label>4</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Marivate</surname> <given-names>V</given-names></name>, <name name-style="western"><surname>de Waal</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Combrink</surname> <given-names>H</given-names></name>, <name name-style="western"><surname>Lebogo</surname> <given-names>O</given-names></name>, <name name-style="western"><surname>Moodley</surname> <given-names>S</given-names></name>, <name name-style="western"><surname>Mtsweni</surname> <given-names>N</given-names></name>, <etal>et al</etal>. <source>Coronavirus disease (COVID-19) case data—South Africa</source>; <year>2020</year>. Available from: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.5281/zenodo.3732419" xlink:type="simple">https://doi.org/10.5281/zenodo.3732419</ext-link>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref005">
<label>5</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Ferguson</surname> <given-names>N</given-names></name>, <name name-style="western"><surname>Laydon</surname> <given-names>D</given-names></name>, <name name-style="western"><surname>Nedjati Gilani</surname> <given-names>G</given-names></name>, <name name-style="western"><surname>Imai</surname> <given-names>N</given-names></name>, <name name-style="western"><surname>Ainslie</surname> <given-names>K</given-names></name>, <name name-style="western"><surname>Baguelin</surname> <given-names>M</given-names></name>, <etal>et al</etal>. <source>Report 9: Impact of non-pharmaceutical interventions (NPIs) to reduce COVID19 mortality and healthcare demand</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref006">
<label>6</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Dehning</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Zierenberg</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Spitzner</surname> <given-names>FP</given-names></name>, <name name-style="western"><surname>Wibral</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Neto</surname> <given-names>JP</given-names></name>, <name name-style="western"><surname>Wilczek</surname> <given-names>M</given-names></name>, <etal>et al</etal>. <source>Inferring COVID-19 spreading rates and potential change points for case number forecasts</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref007">
<label>7</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Song</surname> <given-names>PX</given-names></name>, <name name-style="western"><surname>Wang</surname> <given-names>L</given-names></name>, <name name-style="western"><surname>Zhou</surname> <given-names>Y</given-names></name>, <name name-style="western"><surname>He</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Zhu</surname> <given-names>B</given-names></name>, <name name-style="western"><surname>Wang</surname> <given-names>F</given-names></name>, <etal>et al</etal>. <source>An epidemiological forecast model and software assessing interventions on COVID-19 epidemic in China</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref008">
<label>8</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Brauer</surname> <given-names>F</given-names></name>. In: <name name-style="western"><surname>Brauer</surname> <given-names>F</given-names></name>, <name name-style="western"><surname>van den Driessche</surname> <given-names>P</given-names></name>, <name name-style="western"><surname>Wu</surname> <given-names>J</given-names></name>, editors. <source>Compartmental Models in Epidemiology</source>. <publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer Berlin Heidelberg</publisher-name>; <year>2008</year>. p. <fpage>19</fpage>–<lpage>79</lpage>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref009">
<label>9</label>
<mixed-citation publication-type="journal" xlink:type="simple">
<name name-style="western"><surname>Blackwood</surname> <given-names>JC</given-names></name>, <name name-style="western"><surname>Childs</surname> <given-names>LM</given-names></name>. <article-title>An introduction to compartmental modeling for the budding infectious disease modeler</article-title>. <source>Letters in Biomathematics</source>. <year>2018</year>;<volume>5</volume>(<issue>1</issue>):<fpage>195</fpage>–<lpage>221</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.30707/LiB5.1Blackwood" xlink:type="simple">10.30707/LiB5.1Blackwood</ext-link></comment></mixed-citation>
</ref>
<ref id="pone.0237126.ref010">
<label>10</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Lourenco</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Paton</surname> <given-names>R</given-names></name>, <name name-style="western"><surname>Ghafari</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Kraemer</surname> <given-names>M</given-names></name>, <name name-style="western"><surname>Thompson</surname> <given-names>C</given-names></name>, <name name-style="western"><surname>Simmonds</surname> <given-names>P</given-names></name>, <etal>et al</etal>. <source>Fundamental principles of epidemic spread highlight the immediate need for large-scale serological surveys to assess the stage of the SARS-CoV-2 epidemic</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref011">
<label>11</label>
<mixed-citation publication-type="other" xlink:type="simple">Hellewell J, Abbott S, Gimma A, Bosse NI, Jarvis CI, Russell TW, et al. Feasibility of controlling 2019-nCoV outbreaks by isolation of cases and contacts. medRxiv. 2020;.</mixed-citation>
</ref>
<ref id="pone.0237126.ref012">
<label>12</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Zhou</surname> <given-names>C</given-names></name>, <name name-style="western"><surname>Yuan</surname> <given-names>W</given-names></name>, <name name-style="western"><surname>Wang</surname> <given-names>J</given-names></name>, <name name-style="western"><surname>Xu</surname> <given-names>H</given-names></name>, <name name-style="western"><surname>Jiang</surname> <given-names>Y</given-names></name>, <name name-style="western"><surname>Wang</surname> <given-names>X</given-names></name>, <etal>et al</etal>. <source>Detecting Suspected Epidemic Cases Using Trajectory Big Data</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref013">
<label>13</label>
<mixed-citation publication-type="other" xlink:type="simple">Mbuvha R, Boulkaibet I, Marwala T. Bayesian Automatic Relevance Determination for Feature Selection in Credit Default Modelling. In: International Conference on Artificial Neural Networks. Springer; 2019. p. 420–425.</mixed-citation>
</ref>
<ref id="pone.0237126.ref014">
<label>14</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Boulkaibet</surname> <given-names>I</given-names></name>, <name name-style="western"><surname>Marwala</surname> <given-names>T</given-names></name>, <name name-style="western"><surname>Mthembu</surname> <given-names>L</given-names></name>, <name name-style="western"><surname>Friswell</surname> <given-names>MI</given-names></name>, <name name-style="western"><surname>Adhikari</surname> <given-names>S</given-names></name>. <chapter-title>Sampling Techniques in Bayesian Finite Element Model Updating</chapter-title>. In: <name name-style="western"><surname>Simmermacher</surname> <given-names>T</given-names></name>, <name name-style="western"><surname>Cogan</surname> <given-names>S</given-names></name>, <name name-style="western"><surname>Horta</surname> <given-names>LG</given-names></name>, <name name-style="western"><surname>Barthorpe</surname> <given-names>R</given-names></name>, editors. <source>Topics in Model Validation and Uncertainty Quantification</source>, <volume>Volume 4</volume>. <publisher-loc>New York, NY</publisher-loc>: <publisher-name>Springer New York</publisher-name>; <year>2012</year>. p. <fpage>75</fpage>–<lpage>83</lpage>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref015">
<label>15</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Mbuvha</surname> <given-names>R</given-names></name>, <name name-style="western"><surname>Boulkaibet</surname> <given-names>I</given-names></name>, <name name-style="western"><surname>Marwala</surname> <given-names>T</given-names></name>. <source>Automatic Relevance Determination Bayesian Neural Networks for Credit Card Default Modelling</source>; <year>2019</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref016">
<label>16</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Neal</surname> <given-names>RM</given-names></name>. <chapter-title>Bayesian learning via stochastic dynamics</chapter-title>. In: <source>Advances in neural information processing systems</source>; <year>1993</year>. p. <fpage>475</fpage>–<lpage>482</lpage>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref017">
<label>17</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Neal</surname> <given-names>RM</given-names></name>. <source>Bayesian learning for neural networks</source>. <volume>vol. 118</volume>. <publisher-name>Springer Science &amp; Business Media</publisher-name>; <year>2012</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref018">
<label>18</label>
<mixed-citation publication-type="journal" xlink:type="simple">
<name name-style="western"><surname>Neal</surname> <given-names>RM</given-names></name>, <etal>et al</etal>. <article-title>MCMC using Hamiltonian dynamics</article-title>. <source>Handbook of Markov Chain Monte Carlo</source>. <year>2011</year>;<volume>2</volume>(<issue>11</issue>):<fpage>2</fpage>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref019">
<label>19</label>
<mixed-citation publication-type="journal" xlink:type="simple">
<name name-style="western"><surname>Vehtari</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Gelman</surname> <given-names>A</given-names></name>, <name name-style="western"><surname>Gabry</surname> <given-names>J</given-names></name>. <article-title>Practical Bayesian Model Evaluation Using Leave-One-out Cross-Validation and WAIC</article-title>. <source>Statistics and Computing</source>. <year>2017</year>;<volume>27</volume>(<issue>5</issue>):<fpage>1413</fpage>–<lpage>1432</lpage>. <comment>doi: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/s11222-016-9696-4" xlink:type="simple">10.1007/s11222-016-9696-4</ext-link></comment></mixed-citation>
</ref>
<ref id="pone.0237126.ref020">
<label>20</label>
<mixed-citation publication-type="book" xlink:type="simple">
<name name-style="western"><surname>Karim</surname> <given-names>SA</given-names></name>. <source>SA’s COVID-19 Pandemic Trends and Next Steps</source>; <year>2020</year>.</mixed-citation>
</ref>
<ref id="pone.0237126.ref021">
<label>21</label>
<mixed-citation publication-type="other" xlink:type="simple">Ministry of Health RSA. Update on COVID-19 20th April 2020;. Available from: <ext-link ext-link-type="uri" xlink:href="https://sacoronavirus.co.za/2020/04/20/update-on-covid-19-20th-april-2020/" xlink:type="simple">https://sacoronavirus.co.za/2020/04/20/update-on-covid-19-20th-april-2020/</ext-link>.</mixed-citation>
</ref>
</ref-list>
</back>
<sub-article article-type="aggregated-review-documents" id="pone.0237126.r001" specific-use="decision-letter">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pone.0237126.r001</article-id>
<title-group>
<article-title>Decision Letter 0</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name name-style="western">
<surname>Shaman</surname>
<given-names>Jeffrey</given-names>
</name>
<role>Academic Editor</role>
</contrib>
</contrib-group>
<permissions>
<copyright-year>2020</copyright-year>
<copyright-holder>Jeffrey Shaman</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
</license>
</permissions>
<related-object document-id="10.1371/journal.pone.0237126" document-id-type="doi" document-type="article" id="rel-obj001" link-type="peer-reviewed-article"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>0</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p>
<named-content content-type="letter-date">11 Jun 2020</named-content>
</p>
<p>PONE-D-20-12397</p>
<p>Bayesian Inference of COVID-19 Spreading Rates in South Africa</p>
<p>PLOS ONE</p>
<p>Dear Dr. Mbuvha,</p>
<p>Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.</p>
<p>Please respond to the reviewer comments on a point-by-point basis and revise the manuscript accordingly.</p>
<p>Please submit your revised manuscript by Jul 26 2020 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at <email xlink:type="simple">plosone@plos.org</email>. When you're ready to submit your revision, log on to <ext-link ext-link-type="uri" xlink:href="https://www.editorialmanager.com/pone/" xlink:type="simple">https://www.editorialmanager.com/pone/</ext-link> and select the 'Submissions Needing Revision' folder to locate your manuscript file.</p>
<p>Please include the following items when submitting your revised manuscript:</p>
<p><list list-type="bullet"><list-item><p>A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.</p></list-item><list-item><p>A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.</p></list-item><list-item><p>An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.</p></list-item></list></p>
<p>If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.</p>
<p>If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: <ext-link ext-link-type="uri" xlink:href="http://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols" xlink:type="simple">http://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols</ext-link></p>
<p>We look forward to receiving your revised manuscript.</p>
<p>Kind regards,</p>
<p>Jeffrey Shaman</p>
<p>Academic Editor</p>
<p>PLOS ONE</p>
<p>Journal Requirements:</p>
<p>When submitting your revision, we need you to address these additional requirements.</p>
<p>1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at</p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf" xlink:type="simple">https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf</ext-link> and</p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf" xlink:type="simple">https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf</ext-link></p>
<p>2.We noticed you have some minor occurrence of overlapping text with the following previous publication(s), which needs to be addressed:</p>
<p>- arXiv:1906.06382v1</p>
<p>-<ext-link ext-link-type="uri" xlink:href="https://www.medrxiv.org/content/10.1101/2020.04.07.20057133v2" xlink:type="simple">https://www.medrxiv.org/content/10.1101/2020.04.07.20057133v2</ext-link></p>
<p>In your revision ensure you cite all your sources (including your own works), and quote or rephrase any duplicated text outside the methods section. Further consideration is dependent on these concerns being addressed.</p>
<p>Please also ensure you have described the source of your data in the methods section, including a link or citation which can be used to access the data.</p>
<p>3. Please ensure that you refer to Figures 10,11 &amp; 12 in your text as, if accepted, production will need this reference to link the reader to the figure.</p>
<p>4. Please upload a copy of Supporting Information Appendix S1 which you refer to in your text on page 11.</p>
<p>[Note: HTML markup is below. Please do not edit.]</p>
<p>Reviewers' comments:</p>
<p>Reviewer's Responses to Questions</p>
<p><!-- <font color="black"> --><bold>Comments to the Author</bold></p>
<p>1. Is the manuscript technically sound, and do the data support the conclusions?</p>
<p>The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented. <!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->2. Has the statistical analysis been performed appropriately and rigorously? <!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->3. Have the authors made all data underlying the findings in their manuscript fully available?</p>
<p>The <ext-link ext-link-type="uri" xlink:href="http://www.plosone.org/static/policies.action#sharing" xlink:type="simple">PLOS Data policy</ext-link> requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.<!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->4. Is the manuscript presented in an intelligible fashion and written in standard English?</p>
<p>PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.<!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->5. Review Comments to the Author</p>
<p>Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)<!-- </font> --></p>
<p>Reviewer #1: In their paper the authors analyse with Bayesian methods the increase of COVID-19 case numbers in South Africa. They find two change points in the propagation that they link to respectively to travel bans/containment of infections and onset of massive testing. They conclude that the governmental interventions linked to the first change point were effective.</p>
<p>I recommend this paper for publication because of its timeliness and well described methods and would suggest a few minor revisions:</p>
<p>- In table 2 the authors list compare different sampling methods by their LOO statistic. As far as I understand it this is not useful and misleading. The LOO statistic was developed to compare different models (which are also correctly shown in this table). The lower LOO statistic of the MH sampling probably arises from a incomplete sampling of the posterior which could potentially be fixed letting the chains run longer and/or with a longer burn-in period. A useful statistic to check convergence is the Rhat statistic (<ext-link ext-link-type="uri" xlink:href="https://docs.pymc.io/api/stats.html#pymc3.stats.rhat" xlink:type="simple">https://docs.pymc.io/api/stats.html#pymc3.stats.rhat</ext-link>).</p>
<p>- The scale of the lambda_2 prior in the table 1 doesn't seem to match the prior distribution plotted in Fig. 4. The authors could also think about whether the lambda 1 and 2 priors are well motivated, and eventually make them wider/more uninformative. The posterior of the Lambda 1 prior is in the tail of the prior distribution (Fig. 4).</p>
<p>- In the algorithm of the HMC, in the third line of the leapfrog loop, the closing bracket after "p(t" should be removed.</p>
<p>**********</p>
<p><!-- <font color="black"> -->6. PLOS authors have the option to publish the peer review history of their article (<ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/editorial-and-peer-review-process#loc-peer-review-history" xlink:type="simple">what does this mean?</ext-link>). If published, this will include your full peer review and any attached files.</p>
<p>If you choose “no”, your identity will remain anonymous but your review may still be made public.</p>
<p><bold>Do you want your identity to be public for this peer review?</bold> For information about this choice, including consent withdrawal, please see our <ext-link ext-link-type="uri" xlink:href="https://www.plos.org/privacy-policy" xlink:type="simple">Privacy Policy</ext-link>.<!-- </font> --></p>
<p>Reviewer #1: Yes: Jonas Dehning</p>
<p>[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]</p>
<p>While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, <ext-link ext-link-type="uri" xlink:href="https://pacev2.apexcovantage.com/" xlink:type="simple">https://pacev2.apexcovantage.com/</ext-link>. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at <email xlink:type="simple">figures@plos.org</email>. Please note that Supporting Information files do not need this step.</p>
</body>
</sub-article>
<sub-article article-type="author-comment" id="pone.0237126.r002">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pone.0237126.r002</article-id>
<title-group>
<article-title>Author response to Decision Letter 0</article-title>
</title-group>
<related-object document-id="10.1371/journal.pone.0237126" document-id-type="doi" document-type="peer-reviewed-article" id="rel-obj002" link-type="rebutted-decision-letter" object-id="10.1371/journal.pone.0237126.r001" object-id-type="doi" object-type="decision-letter"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>1</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p>
<named-content content-type="author-response-date">7 Jul 2020</named-content>
</p>
<p>Dear Editor </p>
<p>Kindly find our responses to reviews below.</p>
<p>Best,</p>
<p>Rendani Mbuvha</p>
<p>-----------------------------------------------------------------------------------------------------------</p>
<p>Responses to  Academic Editor </p>
<p>1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at</p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf" xlink:type="simple">https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf</ext-link> and</p>
<p><ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf" xlink:type="simple">https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf</ext-link></p>
<p>Response</p>
<p>We have made changes in line with the formatting guidelines, including:</p>
<p> Changing the affiliation of one author from 'office of the vice-chancellor(his office)' to the institute that he is affiliated to at the university</p>
<p>Changing 'figure' references to 'fig'</p>
<p>Moving supporting information to an appropriately named appendix</p>
<p>Changing subsection headings accordingly</p>
<p>2.We noticed you have some minor occurrence of overlapping text with the following previous publication(s), which needs to be addressed:</p>
<p>- arXiv:1906.06382v1</p>
<p>-<ext-link ext-link-type="uri" xlink:href="https://www.medrxiv.org/content/10.1101/2020.04.07.20057133v2" xlink:type="simple">https://www.medrxiv.org/content/10.1101/2020.04.07.20057133v2</ext-link></p>
<p>In your revision ensure you cite all your sources (including your own works), and quote or rephrase any duplicated text outside the methods section. Further consideration is dependent on these concerns being addressed.</p>
<p>Response:</p>
<p>We have made changes in terms of rewriting, rephrasing(with referencing) and inserting quotations in areas where there was previous overlapping text with our earlier preprints outside the methods section. Please see highlighted changes. </p>
<p>Please also ensure you have described the source of your data in the methods section, including a link or citation which can be used to access the data.</p>
<p>Response:</p>
<p>We have added a description of our data source, including the necessary citation.</p>
<p>3. Please ensure that you refer to Figures 10,11 &amp; 12 in your text as, if accepted, production will need this reference to link the reader to the figure.</p>
<p>Response:</p>
<p>These figures have now been moved to the supporting information files with the relevant references included in the main text.</p>
<p>4. Please upload a copy of Supporting Information Appendix S1 which you refer to in your text on page 11.</p>
<p>Response:</p>
<p>Now included as  separate files - ( this mainly consists of the previous ‘figures’ 10-12 and other diagnostic plots)</p>
<p>---------------------------------------------------------------------------------------------------------------------------------</p>
<p>Responses to Reviewer 1</p>
<p>I recommend this paper for publication because of its timeliness and well described methods and would suggest a few minor revisions:</p>
<p>- In table 2 the authors list compare different sampling methods by their LOO statistic. As far as I understand it this is not useful and misleading. The LOO statistic was developed to compare different models (which are also correctly shown in this table). The lower LOO statistic of the MH sampling probably arises from a incomplete sampling of the posterior which could potentially be fixed letting the chains run longer and/or with a longer burn-in period. A useful statistic to check convergence is the Rhat statistic (<ext-link ext-link-type="uri" xlink:href="https://docs.pymc.io/api/stats.html#pymc3.stats.rhat" xlink:type="simple">https://docs.pymc.io/api/stats.html#pymc3.stats.rhat</ext-link>).</p>
<p>Response:</p>
<p>We agree with the reviewer. We have revised table 2 to only refer to the comparison between models rather than include samplers. We have also increased the number of chain runs to 5000 and increased burn-in to 1000 runs with ten concurrent chains rather than four to increase the likelihood of convergence.</p>
<p>- The scale of the lambda_2 prior in the table 1 doesn't seem to match the prior distribution plotted in Fig. 4. The authors could also think about whether the lambda 1 and 2 priors are well motivated, and eventually make them wider/more uninformative. The posterior of the Lambda 1 prior is in the tail of the prior distribution (Fig. 4).</p>
<p>Response:</p>
<p>We have now changed both priors for lambda 1 and lambda 2 to a wider and relatively less informative LogNormal(log(0.4),0.7).</p>
<p>The change in priors and running the chains for longer marginally changes mean estimates of posterior parameters -- this does not seem to change the overall findings in a material way. </p>
<p>- In the algorithm of the HMC, in the third line of the leapfrog loop, the closing bracket after "p(t" should be removed.</p>
<p>Response:</p>
<p>We have amended the formula typo accordingly.</p>
<supplementary-material id="pone.0237126.s008" mimetype="application/pdf" position="float" xlink:href="info:doi/10.1371/journal.pone.0237126.s008" xlink:type="simple">
<label>Attachment</label>
<caption>
<p>Submitted filename: <named-content content-type="submitted-filename">Response to Reviewers.pdf</named-content></p>
</caption>
</supplementary-material>
</body>
</sub-article>
<sub-article article-type="aggregated-review-documents" id="pone.0237126.r003" specific-use="decision-letter">
<front-stub>
<article-id pub-id-type="doi">10.1371/journal.pone.0237126.r003</article-id>
<title-group>
<article-title>Decision Letter 1</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name name-style="western">
<surname>Shaman</surname>
<given-names>Jeffrey</given-names>
</name>
<role>Academic Editor</role>
</contrib>
</contrib-group>
<permissions>
<copyright-year>2020</copyright-year>
<copyright-holder>Jeffrey Shaman</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<license-p>This is an open access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p>
</license>
</permissions>
<related-object document-id="10.1371/journal.pone.0237126" document-id-type="doi" document-type="article" id="rel-obj003" link-type="peer-reviewed-article"/>
<custom-meta-group>
<custom-meta>
<meta-name>Submission Version</meta-name>
<meta-value>1</meta-value>
</custom-meta>
</custom-meta-group>
</front-stub>
<body>
<p>
<named-content content-type="letter-date">22 Jul 2020</named-content>
</p>
<p>Bayesian Inference of COVID-19 Spreading Rates in South Africa</p>
<p>PONE-D-20-12397R1</p>
<p>Dear Dr. Mbuvha,</p>
<p>We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.</p>
<p>Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.</p>
<p>An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at <ext-link ext-link-type="uri" xlink:href="http://www.editorialmanager.com/pone/" xlink:type="simple">http://www.editorialmanager.com/pone/</ext-link>, click the 'Update My Information' link at the top of the page, and double check that your user information is up-to-date. If you have any billing related questions, please contact our Author Billing department directly at <email xlink:type="simple">authorbilling@plos.org</email>.</p>
<p>If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact <email xlink:type="simple">onepress@plos.org</email>.</p>
<p>Kind regards,</p>
<p>Jeffrey Shaman</p>
<p>Academic Editor</p>
<p>PLOS ONE</p>
<p>Additional Editor Comments (optional):</p>
<p>Reviewers' comments:</p>
<p>Reviewer's Responses to Questions</p>
<p><!-- <font color="black"> --><bold>Comments to the Author</bold></p>
<p>1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.<!-- </font> --></p>
<p>Reviewer #1: All comments have been addressed</p>
<p>**********</p>
<p><!-- <font color="black"> -->2. Is the manuscript technically sound, and do the data support the conclusions?</p>
<p>The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented. <!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->3. Has the statistical analysis been performed appropriately and rigorously? <!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->4. Have the authors made all data underlying the findings in their manuscript fully available?</p>
<p>The <ext-link ext-link-type="uri" xlink:href="http://www.plosone.org/static/policies.action#sharing" xlink:type="simple">PLOS Data policy</ext-link> requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.<!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->5. Is the manuscript presented in an intelligible fashion and written in standard English?</p>
<p>PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.<!-- </font> --></p>
<p>Reviewer #1: Yes</p>
<p>**********</p>
<p><!-- <font color="black"> -->6. Review Comments to the Author</p>
<p>Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)<!-- </font> --></p>
<p>Reviewer #1: The concerns have been fully addressed and in my opinion the manuscript is now acceptable for publication.</p>
<p>**********</p>
<p><!-- <font color="black"> -->7. PLOS authors have the option to publish the peer review history of their article (<ext-link ext-link-type="uri" xlink:href="https://journals.plos.org/plosone/s/editorial-and-peer-review-process#loc-peer-review-history" xlink:type="simple">what does this mean?</ext-link>). If published, this will include your full peer review and any attached files.</p>
<p>If you choose “no”, your identity will remain anonymous but your review may still be made public.</p>
<p><bold>Do you want your identity to be public for this peer review?</bold> For information about this choice, including consent withdrawal, please see our <ext-link ext-link-type="uri" xlink:href="https://www.plos.org/privacy-policy" xlink:type="simple">Privacy Policy</ext-link>.<!-- </font> --></p>
<p>Reviewer #1: <bold>Yes: </bold>Jonas Dehning</p>
</body>
</sub-article>
</article>