<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Epiverse-TRACE: tools for outbreak analytics</title>
<link>https://epiverse-trace.github.io/blog.html</link>
<atom:link href="https://epiverse-trace.github.io/blog.xml" rel="self" type="application/rss+xml"/>
<description>A place for Epiverse-TRACE to share their reflections, learnings, and showcase available tools.</description>
<generator>quarto-1.9.37</generator>
<lastBuildDate>Tue, 10 Mar 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>simulist v0.7.0 (&amp; v0.7.1) and publication in JOSS</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/simulist_joss/</link>
  <description><![CDATA[ 





<!-- markdownlint-disable-next-line -->
<p>We are very excited to announce that a publication accompanying the <a href="https://epiverse-trace.github.io/simulist">simulist</a> package has now been published in the <a href="https://joss.theoj.org/">Journal of Open Source Software (JOSS)</a>: <a href="https://joss.theoj.org/papers/10.21105/joss.08781" class="uri">https://joss.theoj.org/papers/10.21105/joss.08781</a>.</p>
<p>The simulist version coupled to the publication is v0.7.1, however most changes since v0.6.0 were released in v0.7.0 which is <a href="https://CRAN.R-project.org/package=simulist">available on CRAN</a>.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(simulist)</span></code></pre></div></div>
</div>
<p>The updates in the v0.7.0 release contain the JOSS paper (including <code>.md</code>, <code>.bib</code> and figures) and a range of small updates to simulation code and documentation:</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li><p>The sampling of sex for line list and contacts data can now be weighted instead of assuming a uniform probability via <code>prob_male</code> in <code>config</code> (#255).</p></li>
<li><p>The <code>reporting_delay</code> argument in <code>sim_linelist()</code> and <code>sim_outbreak()</code> now supports <code>&lt;epiparameter&gt;</code> objects, matching the functionality of the other delay distribution arguments (#262).</p></li>
<li><p>A new line list events plot has been added to the <code>vis-linelist.Rmd</code> vignette (#278).</p></li>
</ul>
</section>
<section id="minor-changes" class="level2">
<h2 class="anchored" data-anchor-id="minor-changes">Minor changes</h2>
<ul>
<li><p>Added <code>dependabot</code> (#258).</p></li>
<li><p>GitHub actions versions are updated (multiple PRs).</p></li>
<li><p><code>.lintr</code> is updated to include more linters (#279) and the <code># nolint</code> flag syntax is fixed (#263).</p></li>
</ul>
<hr>
<p>The changes in v0.7.1 are minor edits to the JOSS paper for publication.</p>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p>Thanks to the whole Epiverse community for their input on the development of the simulist R package.</p>
<p>Thanks to the team at JOSS for rewarding open source software, and the editors and reviewers for their helpful comments that improved the publication (<a href="https://github.com/openjournals/joss-reviews/issues/8781">open review found here</a>).</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2026,
  author = {Epiverse-TRACE development team, The},
  title = {Simulist V0.7.0 (\&amp; V0.7.1) and Publication in {JOSS}},
  date = {2026-03-10},
  url = {https://epiverse-trace.github.io/posts/simulist_joss/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2026" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2026. <span>“Simulist V0.7.0
(&amp; V0.7.1) and Publication in JOSS.”</span> March 10. <a href="https://epiverse-trace.github.io/posts/simulist_joss/">https://epiverse-trace.github.io/posts/simulist_joss/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/simulist_joss/</guid>
  <pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>simulist v0.6.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/simulist_v0.6.0/</link>
  <description><![CDATA[ 





<!-- markdownlint-disable-next-line -->
<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/simulist">simulist</a> version v0.6.0. Here is an automatically generated summary of the changes in this version.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(simulist)</span></code></pre></div></div>
</div>
<p>In this minor version release we have continued to make a range of improvements across the package. A new line list post-processing function, <code>censor_linelist()</code>, makes it easy to group dates into various intervals, <code>messy_linelist()</code> introduced in v0.5.0 is enhanced, and the package documentation is expanded to cover under-reporting in outbreak data and censoring dates. There are also a couple of minor bug fixes.</p>
<p>The development status of the package is updated to <em>stable</em> from <em>experimental</em> to reflect the long term stability and low probability of major changes.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li><p>A new <code>censor_linelist()</code> function is added to the package. This is a new post-processing function for line list data to censor <code>&lt;Date&gt;</code> to daily, weekly and other user-defined time periods. The <code>censor_linelist()</code> also has a weekend-effect option to replicate the low reporting over weekends. This new feature also adds the {grates} package as a dependency (#240).</p></li>
<li><p><code>messy_linelist()</code> can now accept a vector with multiple <code>missing_value</code>s to allow different values to represent missing data (#241).</p></li>
<li><p>A demonstration of how to replicate under-reporting of line list and contact tracing data is added to the <code>wrangling-linelist.Rmd</code> vignette. The demo contains examples for multiple types of under-reporting data found in real-world outbreaks (#244).</p></li>
</ul>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li><p>The <code>$was_case</code> column in contact tracing data simulated by <code>sim_contacts()</code> now contains <code>logical</code> boolean values instead of <code>"Y"</code> and <code>"N"</code> <code>character</code> strings (#243).</p></li>
<li><p>The minimum R version required by the package is incremented to v4.2.0 due to a recursive dependency on {fastymd} (#235).</p></li>
</ul>
</section>
<section id="minor-changes" class="level2">
<h2 class="anchored" data-anchor-id="minor-changes">Minor changes</h2>
<ul>
<li><p>Documentation on censoring dates is added to <code>wrangling-linelist.Rmd</code> (#240).</p></li>
<li><p>Documentation on interoperability between {simulist} and {incidence2} for double precision <code>&lt;Date&gt;</code>s and warning for not specifying <code>interval</code> in <code>incidence2::incidence()</code> is added to <code>vis-linelist.Rmd</code> (#232).</p></li>
<li><p>The lifecycle of the package has been updated from <em>experimental</em> to <em>stable</em> (#229).</p></li>
<li><p><code>@return</code> function documentation for exported functions is improved (#235).</p></li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li><p><code>truncate_linelist()</code> sets <code>$outcome</code> to <code>NA</code> if they are more recent than truncation time. This matches the way <code>$date_outcome</code> was handled in <code>truncate_linelist()</code> in v0.5.0 (#228).</p></li>
<li><p>Alt-text in vignettes is fixed to render correctly on pkgdown website (#230).</p></li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/joshwlambert">@joshwlambert</a> <a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/TimTaylor">@TimTaylor</a> <a href="https://github.com/sbfnk">@sbfnk</a> <a href="https://github.com/seabbs">@seabbs</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Simulist V0.6.0},
  date = {2025-08-28},
  url = {https://epiverse-trace.github.io/posts/simulist_v0.6.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Simulist
V0.6.0.”</span> August 28. <a href="https://epiverse-trace.github.io/posts/simulist_v0.6.0/">https://epiverse-trace.github.io/posts/simulist_v0.6.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/simulist_v0.6.0/</guid>
  <pubDate>Thu, 28 Aug 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Epiverse community engagement and software sustainability for research software</title>
  <dc:creator>Joshua W. Lambert</dc:creator>
  <link>https://epiverse-trace.github.io/posts/epi-community-contrib/</link>
  <description><![CDATA[ 





<p>Software that is developed for research or by researchers can be difficult to maintain given the incentive and funding structures in academia. This remains true for epidemiology, with a large volume of software written during the COVID-19 pandemic, much of which is now abandonware<sup>1</sup>. This does not mean that the software developed to understand the COVID-19 pandemic was bad or does not have utility in understanding future epidemics and pandemics, but just that the capacity to maintain and further develop these tools is not available now the pandemic is no <a href="https://www.who.int/news/item/05-05-2023-statement-on-the-fifteenth-meeting-of-the-international-health-regulations-(2005)-emergency-committee-regarding-the-coronavirus-disease-(covid-19)-pandemic">longer considered an acute public health emergency</a>.</p>
<p>These issues around software sustainability and the academic structures that hinder software longevity were raised by <span class="citation" data-cites="kucharskiCOVID19ResponseIllustrates2020">Kucharski et al. (2020)</span> and were one of the leading reasons for the <a href="https://epiverse-trace.github.io/">Epiverse-TRACE initiative</a>. Alongside the developing novel software (R packages), Epiverse also has a commitment to support the community of package developers in epidemiology and outbreak analytics. The initiative also tries to improve community collaboration and contribution friendliness of open-source software.</p>
<p>This blog post highlights some recent work by Epiverse software engineers to collaborate on research software, or researchware, to help improve an R package that was initially written in the early days of the COVID-19 pandemic (January 2020 - May 2020) to assess the effectiveness of isolation and contact tracing effectiveness <span class="citation" data-cites="hellewellFeasibilityControllingCOVID192020">(Hellewell et al. 2020)</span>. It built on code written for the 2014-2016 West Africa Ebola outbreak to provide insights into ring vaccination <span class="citation" data-cites="kucharskiEffectivenessRingVaccination2016">(Kucharski et al. 2016)</span>. These applications and the general nature of the questions the package addresses suggest that it could be of great help in future infectious disease outbreaks, but has lacked developer resources without pandemic-related priorities.</p>
<section id="the-r-package" class="level2">
<h2 class="anchored" data-anchor-id="the-r-package">The R package</h2>
<p>The R package in question is <a href="https://github.com/epiforecasts/ringbp">{ringbp}</a>. The package has two pieces of functionality: 1) to simulate an infectious disease outbreak using a branching process model with non-pharmaceutical interventions; and 2) to calculate the proportion of simulated outbreaks that are contained (i.e.&nbsp;do not cause a large sustained human-to-human epidemic). The utility of the package’s general model framework has been shown by serving as a template for other epidemiological research such as <a href="https://sophiemeakin.github.io/pepbp/">post-exposure prophylaxis</a>, <a href="https://github.com/lgs85/covidhm">network effects on control</a> <span class="citation" data-cites="firthUsingRealworldNetwork2020">(Firth et al. 2020)</span> and the <a href="https://github.com/timcdlucas/ringbp">impact of self-reporting and isolation adherence</a> <span class="citation" data-cites="davisImperfectToolContact2020">(Davis et al. 2020)</span>.</p>
</section>
<section id="the-problem" class="level2">
<h2 class="anchored" data-anchor-id="the-problem">The problem</h2>
<p>It is understandable that because {ringbp} was written in haste to produce insights to inform pandemic response it did not adhere to all software best practices. Usability, documentation, testing, code style, and (computational) performance could be improved. Certain aspects of model code, like parameterisations, were hard-coded, not providing users the full flexibility that the model could allow.</p>
</section>
<section id="epiverse-contribution" class="level2">
<h2 class="anchored" data-anchor-id="epiverse-contribution">Epiverse contribution</h2>
<p>In the recent months Epiverse has collaborated with {ringbp} developers Seb Funk (also a member of Epiverse) and Carl Pearson (external collaborator), based at the London School of Hygiene and Tropical Medicine and University of North Carolina, respectively, to try and improve the R package, both internally and from the user-experience. The following sections will give brief summaries of some of the collaborative developments.</p>
<section id="user-interface" class="level3">
<h3 class="anchored" data-anchor-id="user-interface">User interface</h3>
<p>The user experience of the package has been refactored. The main simulation function <code>scenario_sim()</code> remains, but its arguments have been modularised to better group model parameters and control arguments. This also makes the package easier to develop further without necessarily introducing many breaking changes and prevents the number of top-level function arguments from expanding.</p>
</section>
<div class="columns">
<div class="column" style="width:47.5%;">
<section id="old" class="level3">
<h3 class="anchored" data-anchor-id="old">Old</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">scenario_sim</span>(</span>
<span id="cb1-2">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n.sim =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,</span>
<span id="cb1-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">num.initial.cases =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,</span>
<span id="cb1-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cap_max_days =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">365</span>,</span>
<span id="cb1-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cap_cases =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2000</span>,</span>
<span id="cb1-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">r0isolated =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span id="cb1-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">r0community =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>,</span>
<span id="cb1-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">disp.iso =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,</span>
<span id="cb1-9">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">disp.com =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.16</span>,</span>
<span id="cb1-10">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">k =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.7</span>,</span>
<span id="cb1-11">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">delay_shape =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>,</span>
<span id="cb1-12">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">delay_scale =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,</span>
<span id="cb1-13">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop.asym =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span id="cb1-14">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop.ascertain =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb1-15">)</span></code></pre></div></div>
</section>
</div><div class="column" style="width:5%;">
<!-- empty column to create gap -->
</div><div class="column" style="width:47.5%;">
<section id="new" class="level3">
<h3 class="anchored" data-anchor-id="new">New</h3>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">scenario_sim</span>(</span>
<span id="cb2-2"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,</span>
<span id="cb2-3"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">initial_cases =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,</span>
<span id="cb2-4"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">offspring =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">offspring_opts</span>(</span>
<span id="cb2-5">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">community =</span> \(n) <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rnbinom</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> n, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mu =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.16</span>),</span>
<span id="cb2-6">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">isolated =</span> \(n) <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rnbinom</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> n, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mu =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>),</span>
<span id="cb2-7">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">asymptomatic =</span> \(n) <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rnbinom</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> n, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mu =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">size =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.16</span>)</span>
<span id="cb2-8">  ),</span>
<span id="cb2-9"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">delays =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">delay_opts</span>(</span>
<span id="cb2-10">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">incubation_period =</span> \(n) <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rweibull</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> n, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">shape =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.32</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">scale =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6.49</span>),</span>
<span id="cb2-11">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">onset_to_isolation =</span> \(n) <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rweibull</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n =</span> n, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">shape =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.5</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">scale =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>)</span>
<span id="cb2-12">  ),</span>
<span id="cb2-13"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">event_probs =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">event_prob_opts</span>(</span>
<span id="cb2-14">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">asymptomatic =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span id="cb2-15">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">presymptomatic_transmission =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.3</span>,</span>
<span id="cb2-16">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">symptomatic_ascertained =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb2-17">  ),</span>
<span id="cb2-18"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">interventions =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">intervention_opts</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">quarantine =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>),</span>
<span id="cb2-19"> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sim =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sim_opts</span>(</span>
<span id="cb2-20">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cap_max_days =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">365</span>,</span>
<span id="cb2-21">   <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cap_cases =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2000</span></span>
<span id="cb2-22">  )</span>
<span id="cb2-23">)</span></code></pre></div></div>
</section>
</div>
</div>
<p>The new API gives the user more control over the model’s parameterisation. The incubation period is now specified by the user instead of being set to an estimate for COVID-19. The way offspring and delay distribution functions are specified also means that any distributional or non-parametric form can be supplied, relaxing the assumption that the onset-to-isolation has to be a Weibull distribution.</p>
<p>Users can now specify the proportion of presymptomatic transmission rather than having to understand the skew normal parameterisation used by the simulation model, making it easier to get started with the package for new users.</p>
<p>Lastly on user-facing changes, the naming and style of function arguments has been standardised for consistent use of <a href="https://en.wikipedia.org/wiki/Snake_case">snakecase</a> style and abbreviations.</p>
<section id="documentation" class="level3">
<h3 class="anchored" data-anchor-id="documentation">Documentation</h3>
<p>Function documentation already used {roxygen2}, but did not make use of inheritance or comprehensively document the function output or usage. We used <code>@inheritParams</code> from {roxygen2} to deduplicate, added <code>@return</code> documentation to all functions. We also improved the function argument documentation by following a structure of: <code>&lt;type&gt;: description</code>, for example:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">@</span>param sim a <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">list</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span> with class <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">&lt;ringbp_sim_opts&gt;</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">`</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span> the simulation control</span>
<span id="cb3-2">  options <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> the \pkg{ringbp} model, returned by [<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sim_opts</span>()]</span></code></pre></div></div>
<p>Exported functions now have informative examples (<code>@examples</code>) to showcase how the functions should be used. Function examples now always run (removing <code>\dontrun{}</code>) to catch any errors.</p>
<p>The <a href="https://github.com/anthonynorth/roxyglobals">{roxyglobals}</a> package has been added to automate the management of global variables with the use of the <code>@autoglobal</code> tag.</p>
<p>Vignettes are useful long-form package documentation. Thus far we’ve added one vignette to the package and plan to add more where relevant.</p>
</section>
<section id="bug-fixes" class="level3">
<h3 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h3>
<p>Perhaps more important that any of the software best practices and user interface is the correctness of the code. In our developments we’ve uncovered a few bugs in the previous version of {ringbp}. Errors in the timing of quarantining infected individuals, sampling from the onset-to-isolation distribution, and calculating the generation time from the incubation period have all been identified and fixed.</p>
</section>
<section id="testing" class="level3">
<h3 class="anchored" data-anchor-id="testing">Testing</h3>
<p>To ensure the correctness of the code is maintained with continued package development we have added regression (<a href="https://testthat.r-lib.org/articles/snapshotting.html">snapshot</a>) unit tests. These tests automatically detect if updates to the code cause breaking changes to the output of the exported functions. In combination with continuous integration these regression tests aid developers in finding and fixing bugs.</p>
</section>
<section id="miscellaneous" class="level3">
<h3 class="anchored" data-anchor-id="miscellaneous">Miscellaneous</h3>
<p>There are various other changes in {ringbp} from our work. Examples include: input checking, not specifying erroneous function defaults, updating the package website, and functions that return <code>data.table</code> objects no longer <a href="https://cran.r-project.org/web/packages/data.table/vignettes/datatable-faq.html#sec:why-do-i-have-to-type-dt-sometimes-twice-after-using-to-print-the-result-to-console">returning silently</a>. Mentioned in the introduction, model performance has been incrementally improved, but we’ve not focused on this aspect, and the package will benefit from time spent focusing on this in the future; especially if the set and complexity of non-pharmaceutical interventions in the model expands.</p>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>The {ringbp} R package implements a simple but informative model for infectious disease transmission and interventions. When originally written it included many well-developed aspects, but the time constraints of real-time outbreak response meant several improvements were possible.</p>
<p>Epiverse-TRACE has the opportunity to not only develop new tooling for pandemic preparedness and response, but to contribute to the ecosystem of open-source software in infectious disease epidemiology. We hope that by covering the collaborative developments of {ringbp}, it can illustrate the benefits of bringing software up to date with best practices, and make tools available, accessible and robust when a new epidemic or pandemic occurs, in turn hopefully removing the need for redeveloping similar software in the future.</p>
<p>These efforts are not limited to {ringbp}. Similar contributions have been made to other packages, including <a href="https://epiforecasts.io/EpiNow2/">EpiNow2</a>, and open source communities such as the <a href="https://github.com/epinowcast/">epinowcast</a> community, where documentation, testing, and code enhancements have helped strengthen the forecasting and nowcasting software ecosystem in the last couple of years.</p>
<p>Enhancing the accessibility of software for users and developers by improving its documentation and user interface will hopefully provide a gateway for more external contributors to engage with the project. In the public health landscape of temporal surges in capacity and priorities, better enabling community contributions to open-source software should aid software sustainability.</p>
<p>All of the changes discussed in this blog post can be found in the <a href="https://epiforecasts.io/ringbp/news/index.html">{ringbp} news</a>. For details of developments see the <a href="https://github.com/epiforecasts/ringbp/pulls?q=is%3Apr+is%3Aclosed">pull request history of {ringbp} on GitHub</a>.</p>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p>Thanks to Seb Funk, Carl Pearson and James Azam for helpful feedback when drafting this post and for their collaboration on the {ringbp} project.</p>



</section>


<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent">
<div id="ref-davisImperfectToolContact2020" class="csl-entry">
Davis, Emma L., Tim C. D. Lucas, Anna Borlase, et al. 2020. <em>An Imperfect Tool: Contact Tracing Could Provide Valuable Reductions in <span>COVID-19</span> Transmission If Good Adherence Can Be Achieved and Maintained</em>. <a href="https://doi.org/10.1101/2020.06.09.20124008">https://doi.org/10.1101/2020.06.09.20124008</a>.
</div>
<div id="ref-firthUsingRealworldNetwork2020" class="csl-entry">
Firth, Josh A., Joel Hellewell, Petra Klepac, et al. 2020. <span>“Using a Real-World Network to Model Localized <span>COVID-19</span> Control Strategies.”</span> <em>Nature Medicine</em> 26 (10): 1616–22. <a href="https://doi.org/10.1038/s41591-020-1036-8">https://doi.org/10.1038/s41591-020-1036-8</a>.
</div>
<div id="ref-hellewellFeasibilityControllingCOVID192020" class="csl-entry">
Hellewell, Joel, Sam Abbott, Amy Gimma, et al. 2020. <span>“Feasibility of Controlling <span>COVID-19</span> Outbreaks by Isolation of Cases and Contacts.”</span> <em>The Lancet Global Health</em> 8 (4): e488–96. <a href="https://doi.org/10.1016/S2214-109X(20)30074-7">https://doi.org/10.1016/S2214-109X(20)30074-7</a>.
</div>
<div id="ref-kucharskiEffectivenessRingVaccination2016" class="csl-entry">
Kucharski, Adam J., Rosalind M. Eggo, Conall H. Watson, Anton Camacho, Sebastian Funk, and W. John Edmunds. 2016. <span>“Effectiveness of <span>Ring Vaccination</span> as <span>Control Strategy</span> for <span>Ebola Virus Disease</span>.”</span> <em>Emerging Infectious Diseases</em> 22 (1): 105–8. <a href="https://doi.org/10.3201/eid2201.151410">https://doi.org/10.3201/eid2201.151410</a>.
</div>
<div id="ref-kucharskiCOVID19ResponseIllustrates2020" class="csl-entry">
Kucharski, Adam J., Sebastian Funk, and Rosalind M. Eggo. 2020. <span>“The <span>COVID-19</span> Response Illustrates That Traditional Academic Reward Structures and Metrics Do Not Reflect Crucial Contributions to Modern Science.”</span> <em>PLOS Biology</em> 18 (10): e3000913. <a href="https://doi.org/10.1371/journal.pbio.3000913">https://doi.org/10.1371/journal.pbio.3000913</a>.
</div>
</div></section><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p><a href="https://dictionary.cambridge.org/dictionary/english/abandonware">Defined by Cambridge Dictionary</a> as: “software that is no longer produced or supported by the company that originally made it”.↩︎</p></li>
</ol>
</section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{w._lambert2025,
  author = {W. Lambert, Joshua},
  title = {Epiverse Community Engagement and Software Sustainability for
    Research Software},
  date = {2025-08-25},
  url = {https://epiverse-trace.github.io/posts/epi-community-contrib/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-w._lambert2025" class="csl-entry quarto-appendix-citeas">
W. Lambert, Joshua. 2025. <span>“Epiverse Community Engagement and
Software Sustainability for Research Software.”</span> August 25. <a href="https://epiverse-trace.github.io/posts/epi-community-contrib/">https://epiverse-trace.github.io/posts/epi-community-contrib/</a>.
</div></div></section></div> ]]></description>
  <category>open-source</category>
  <category>R</category>
  <category>R package</category>
  <category>epidemiology</category>
  <category>community</category>
  <category>Epiverse</category>
  <category>DOI</category>
  <guid>https://epiverse-trace.github.io/posts/epi-community-contrib/</guid>
  <pubDate>Mon, 25 Aug 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>superspreading v0.4.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/superspreading_v0.4.0/</link>
  <description><![CDATA[ 





<!-- markdownlint-disable-next-line -->
<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/superspreading">superspreading</a> version v0.4.0. Here is an automatically generated summary of the changes in this version.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(superspreading)</span></code></pre></div></div>
</div>
<p>The fourth minor release of the <em>superspreading</em> package contains new functionality, a new vignette and various minor improvements to documentation.</p>
<p>With this release the development status of the package has been updated from <em>experimental</em> to <em>stable</em>.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li><p>The <code>probability_emergence()</code> function has been added to calculate the probability that a pathogen introduced to humans can evolve and emerge to cause a sustained human-to-human outbreak, implementing and extending the framework of <a href="https://doi.org/10.1038/nature02104">Antia et al.&nbsp;(2003)</a> (#124, #133).</p></li>
<li><p>A new vignette, <code>emergence.Rmd</code>, has been added that covers the functionality of <code>probability_emergence()</code> and reproduces the two figures from <a href="https://doi.org/10.1038/nature02104">Antia et al.&nbsp;(2003)</a> as well as a figure using the multiple introductions extension (#124, #133).</p></li>
<li><p>Alt-text has been added to all plots across all vignettes (#129).</p></li>
</ul>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li>The <code>percent_transmission</code> argument in <code>proportion_transmission()</code> has been renamed to <code>prop_transmission</code> (#130).</li>
</ul>
</section>
<section id="minor-changes" class="level2">
<h2 class="anchored" data-anchor-id="minor-changes">Minor changes</h2>
<ul>
<li><p>An <code>.aspell/</code> folder is added to the package including <code>defaults.R</code> and <code>superspreading.rds</code> to supply a wordlist to the CRAN spell checking to avoid quoting names in the <code>DESCRIPTION</code> (#127).</p></li>
<li><p>Package and function documentation has been updated. Vignette changes include minor reworking of text, updating any information or links that were outdated; function documentation is styled more consistently and follows the <a href="https://style.tidyverse.org/documentation.html">Tidyverse style guide</a> (#131, #134).</p></li>
<li><p>Internal code style has been updated to adhere to current best practice (#125).</p></li>
<li><p>The package lifecycle badge has been updated from <em>experimental</em> to <em>stable</em>. CRAN status, CRAN downloads, repo status and Zenodo DOI badges have been added to the <code>README</code> (#119, #132).</p></li>
<li><p>The {pkgdown} <code>development: mode</code> has been set to <code>auto</code> now the package is hosted on CRAN (#118).</p></li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/joshwlambert">@joshwlambert</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Superspreading V0.4.0},
  date = {2025-07-16},
  url = {https://epiverse-trace.github.io/posts/superspreading_v0.4.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Superspreading
V0.4.0.”</span> July 16. <a href="https://epiverse-trace.github.io/posts/superspreading_v0.4.0/">https://epiverse-trace.github.io/posts/superspreading_v0.4.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/superspreading_v0.4.0/</guid>
  <pubDate>Wed, 16 Jul 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>safeframe v1.0.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/safeframe_v1.0.0/</link>
  <description><![CDATA[ 





<!-- markdownlint-disable-next-line -->
<p>We are very excited to announce the first stable release of <a href="https://epiverse-trace.github.io/safeframe">safeframe</a> (version v1.0.0).</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(safeframe)</span></code></pre></div></div>
</div>
<section id="safeframe-1.0.0" class="level1">
<h1>safeframe 1.0.0</h1>
<ul>
<li>First release of <strong>safeframe</strong>.</li>
<li>Factors out the core functionality of <strong>linelist</strong> to make it more viable for alternative domains</li>
<li>General usage remains the same:</li>
</ul>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Create a safeframe object</span></span>
<span id="cb2-2">x <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_safeframe</span>(cars, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mph =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"speed"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distance =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dist"</span>)</span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Validate the tagged data are of a specific type</span></span>
<span id="cb2-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">validate_safeframe</span>(x,</span>
<span id="cb2-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mph =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'numeric'</span>,        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># speed should be numeric</span></span>
<span id="cb2-7">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># type() is a helper function of related classes</span></span>
<span id="cb2-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distance =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">type</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'numeric'</span>)    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># dist should be numeric, integer</span></span>
<span id="cb2-9">)</span></code></pre></div></div>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/dependabot%5Bbot%5D">@dependabot[bot]</a> <a href="https://github.com/joshwlambert">@joshwlambert</a> <a href="https://github.com/thibautjombart">@thibautjombart</a> <a href="https://github.com/TimTaylor">@TimTaylor</a></p>


</section>
</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Safeframe V1.0.0},
  date = {2025-06-30},
  url = {https://epiverse-trace.github.io/posts/safeframe_v1.0.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Safeframe
V1.0.0.”</span> June 30. <a href="https://epiverse-trace.github.io/posts/safeframe_v1.0.0/">https://epiverse-trace.github.io/posts/safeframe_v1.0.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/safeframe_v1.0.0/</guid>
  <pubDate>Mon, 30 Jun 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>linelist v2.0.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/linelist_v2.0.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/linelist">linelist</a> version v2.0.0. Here is an automatically generated summary of the changes in this version.</p>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li><p>The linelist package is now dependent on R 4.1.0, in line with Epiverse-TRACE policy regarding minimum R version dependency (#159, <a href="https://github.com/Bisaloo">@Bisaloo</a>).</p></li>
<li><p>Deprecated functions and arguments have been completely removed. The following operations are no longer possible:</p>
<ul>
<li><p>List of tags now needs to be spliced in <code>make_linelist()</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1">my_tags <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(</span>
<span id="cb1-2">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">id =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"case_ID"</span>,</span>
<span id="cb1-3">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_onset =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"date_of_prodrome"</span>,</span>
<span id="cb1-4">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">age =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>,</span>
<span id="cb1-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">gender =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"gender"</span></span>
<span id="cb1-6">)</span>
<span id="cb1-7"></span>
<span id="cb1-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No longer possible</span></span>
<span id="cb1-9"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_linelist</span>(obj, my_tags)</span>
<span id="cb1-10"></span>
<span id="cb1-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Instead slice list in dynamic dots</span></span>
<span id="cb1-12"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_linelist</span>(obj, <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!!!</span>my_tags)</span></code></pre></div></div></li>
<li><p><code>select_tags()</code>:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No longer possible</span></span>
<span id="cb2-2">x <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb2-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select_tags</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>)</span>
<span id="cb2-4"></span>
<span id="cb2-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Instead use</span></span>
<span id="cb2-6">x <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb2-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">has_tag</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">%&gt;%</span></span>
<span id="cb2-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tags_df</span>()</span></code></pre></div></div></li>
<li><p><code>select.linelist()</code>. This change should be invisible to users since the parent method <code>select.data.frame()</code> will be used with the same effect.</p></li>
<li><p><code>lost_tags_action()</code> as part of a pipeline is no longer possible:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No longer possible</span></span>
<span id="cb3-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_linelist</span>(cars, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_onset =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dist"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_outcome =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"speed"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lost_tags_action</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"none"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-4">  dplyr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>dist)</span>
<span id="cb3-5"></span>
<span id="cb3-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Instead do</span></span>
<span id="cb3-7"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lost_tags_action</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"none"</span>)</span>
<span id="cb3-8"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_linelist</span>(cars, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_onset =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dist"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_outcome =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"speed"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-9">  dplyr<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">select</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>dist)</span></code></pre></div></div></li>
</ul></li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/Karim-Mane">@Karim-Mane</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Linelist V2.0.0},
  date = {2025-04-28},
  url = {https://epiverse-trace.github.io/posts/linelist_v2.0.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Linelist
V2.0.0.”</span> April 28. <a href="https://epiverse-trace.github.io/posts/linelist_v2.0.0/">https://epiverse-trace.github.io/posts/linelist_v2.0.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/linelist_v2.0.0/</guid>
  <pubDate>Mon, 28 Apr 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>cleanepi v1.1.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/cleanepi_v1.1.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/cleanepi">cleanepi</a> version v1.1.0. Here is an automatically generated summary of the changes in this version.</p>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li><p>Fixed a bug in the index for empty rows returned by <code>print_report()</code> after <code>remove_constants()</code>. This function was incorrectly returning the number of rows in the original data frame, instead of the index of empty rows (#173, <span class="citation" data-cites="Bisaloo">@Bisaloo</span>).</p></li>
<li><p>Fixed a bug in the date guesser used by the <code>standardize_dates()</code> function. The followings updates were made (#175, <span class="citation" data-cites="Karim-Mane">@Karim-Mane</span>):</p>
<ul>
<li>allow for quarter and partial dates, and</li>
<li>account for odd cases before parsing using the {lubridate} package.</li>
</ul></li>
</ul>
</section>
<section id="enhancements" class="level2">
<h2 class="anchored" data-anchor-id="enhancements">Enhancements</h2>
<ul>
<li><p>Rendering the report no longer requires the use of the {withr} package. Files generated during this process will be stored in the R temporary directory (#165, <span class="citation" data-cites="Bisaloo">@Bisaloo</span>).</p></li>
<li><p>Simplification and improvement of code performance across several functions (#154, #156, #162, <span class="citation" data-cites="Bisaloo">@Bisaloo</span>).</p></li>
<li><p>Make R version dependency explicit (#156, <span class="citation" data-cites="Bisaloo">@Bisaloo</span>).</p></li>
<li><p>Replace base R pipe operator with the {tidyverse} package pipe operator (#155, <span class="citation" data-cites="Karim-Mane">@Karim-Mane</span>).</p></li>
<li><p>Stop automatic conversion of numeric values into Date due to unexpected results from <code>date_guess()</code> function (#151, <span class="citation" data-cites="Karim-Mane">@Karim-Mane</span>).</p></li>
<li><p>Allow for a vector of character for <code>na_strings</code> argument in <code>replace_missing_values()</code> (#180, Karim-Mane).</p></li>
<li><p>Improved messaging to differentiate between duplicates found in the subject IDs column and duplicates across multiple columns (#180, Karim-Mane).</p></li>
<li><p>Allow for iterative constant data removal (#180, Karim-Mane).</p></li>
<li><p>The <code>remove_constants()</code> now works correctly when the <code>cutoff</code> is different from 1. More importantly, the function no longer depends on the {janitor} package (#177, Karim-Mane).</p></li>
<li><p>The <code>scan_data()</code> now makes use of <code>date_guess()</code> to parse date from characters and <code>lubridate::as_date()</code> to parse dates from numeric. This function now operates only on character columns (#181, Karim-Mane).</p></li>
<li><p>Replace <code>snakecase::to_snake_case()</code> with <code>janitor::clean_names()</code> and make sure variable names specified in <code>keep</code> and <code>rename</code> are preserved after applying <code>janitor::clean_names()</code> (#180, Karim-Mane).</p></li>
<li><p>Use the {cli} package for formatting messages in the package (#196, Karim-Mane).</p></li>
<li><p>Translate messages in the package into French using the {potools} package (#196, Karim-Mane).</p></li>
<li><p>An additional column (<strong>row_id</strong>) with the row indices where the incorrect date sequences are found is now added to the report made from the <code>check_date_sequence()</code> function (#196, Karim-Mane).</p></li>
<li><p>The <code>date_guess()</code> and related functions now returns a list of two elements: the converted values and a boolean that informs about the presence of numeric values that can also be of type Date (#181, Karim-Mane).</p></li>
<li><p>Update the package vignette to account for the improvements made in the different pull requests (#194, Karim-Mane).</p></li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>Function documentations have been updated. The <code>clean_data()</code> no longer takes the <code>params</code> argument. Instead, it takes many other arguments that are described in the function documentation and the package vignettes (#184, Karim-Mane).</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/Degoot-AM">@Degoot-AM</a> <a href="https://github.com/joshwlambert">@joshwlambert</a> <a href="https://github.com/Karim-Mane">@Karim-Mane</a> <a href="https://github.com/LloydChapman">@LloydChapman</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Cleanepi V1.1.0},
  date = {2025-04-21},
  url = {https://epiverse-trace.github.io/posts/cleanepi_v1.1.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Cleanepi
V1.1.0.”</span> April 21. <a href="https://epiverse-trace.github.io/posts/cleanepi_v1.1.0/">https://epiverse-trace.github.io/posts/cleanepi_v1.1.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/cleanepi_v1.1.0/</guid>
  <pubDate>Mon, 21 Apr 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Integration testing in Epiverse-TRACE</title>
  <dc:creator>Joshua W. Lambert</dc:creator>
  <link>https://epiverse-trace.github.io/posts/integration-testing/</link>
  <description><![CDATA[ 





<p>In Epiverse-TRACE we develop a suite of R packages that tackle predictable tasks in infectious disease outbreak response. One of the <a href="https://epiverse-trace.github.io/blueprints/principles.html">guiding software design principles</a> we have worked towards is <em>interoperability</em> of tooling, both between Epiverse software, but also integrating with the <a href="https://epiverse-trace.github.io/slides/epireview-hackathon-july-2024/">wider ecosystem of R packages in epidemiology</a>.</p>
<p>This principle stems from the needs of those responding to, quantifying, and understanding outbreaks, to create epidemiological pipelines. These pipelines combine a series of tasks, where the output of one task is input into the next, forming an analysis chain (directed acyclic graph of computational tasks). By building interoperability into our R packages we try to reduce the friction of connecting different blocks in the pipeline. The <a href="https://epiverse-trace.github.io/slides/interoperability-epiverse/">three interoperability principles in our strategy</a> are: 1) <em>consistency</em>, 2) <em>composability</em>, and 3) <em>modularity</em>.</p>
<p>To ensure interoperability between Epiverse-TRACE R packages is developed and maintained, we utilise <em>integration testing</em>. This post explains our use of integration testing with a case study looking at the complementary design and interoperability of the <a href="https://epiverse-trace.github.io/simulist/">{simulist}</a> and <a href="https://epiverse-trace.github.io/cleanepi/">{cleanepi}</a> R packages.</p>
<div class="callout callout-style-default callout-tip callout-titled" title="Different types of testing">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Tip</span>Different types of testing
</div>
</div>
<div class="callout-body-container callout-body">
<p>In comparison to commonly used <em>unit testing</em>, which looks to isolate and test specific parts of a software package, e.g.&nbsp;a function; <em>integration testing</em> is the testing of several components of software, both within and between packages. Therefore, integration testing can be used to ensure interoperability is maintained while one or multiple components in pipelines are being developed. <a href="https://en.wikipedia.org/wiki/Continuous_integration">Continuous integration</a> provides a way to run these tests before merging, releasing, or deploying code.</p>
</div>
</div>
<section id="how-we-setup-integration-testing-in-epiverse" class="level2">
<h2 class="anchored" data-anchor-id="how-we-setup-integration-testing-in-epiverse">How we setup integration testing in Epiverse</h2>
<p>The Epiverse-TRACE collection of packages has a meta-package, <a href="https://epiverse-trace.github.io/epiverse/">{epiverse}</a>, analogous to the <a href="https://www.tidyverse.org/blog/2023/03/tidyverse-2-0-0/">tidyverse meta-package</a> (loaded with <code>library(tidyverse)</code>). By default, {epiverse} has dependencies on all released and stable Epiverse-TRACE packages, therefore it is a good home for integration testing. This avoids burdening individual Epiverse packages with taking on potentially extra dependencies purely to test interoperability.</p>
<p>Just as with unit testing within the individual Epiverse packages, we use the <a href="https://testthat.r-lib.org/">{testthat}</a> framework for integration testing (although integration testing can be achieved using other testing frameworks).</p>
</section>
<section id="case-study-of-interoperable-functionality-using-simulist-and-cleanepi" class="level2">
<h2 class="anchored" data-anchor-id="case-study-of-interoperable-functionality-using-simulist-and-cleanepi">Case study of interoperable functionality using {simulist} and {cleanepi}</h2>
<p>The aim of {simulist} is to simulate outbreak data, such as line lists or contact tracing data. By default it generates complete and accurate data, but can also augment this data to emulate empirical data via post-processing functionality. One such post-processing function is <code>simulist::messy_linelist()</code>, which introduces a range of irregularities, missingness, and type coercions to simulated line list data. Complementary to this, the {cleanepi} package has a set of cleaning functions that standardised tabular epidemiological data, recording the set of cleaning operations run by compiling a <a href="https://epiverse-trace.github.io/cleanepi/articles/design_principle.html#output">report and appending it to the cleaned data</a>.</p>
<section id="example-of-an-integration-test" class="level3">
<h3 class="anchored" data-anchor-id="example-of-an-integration-test">Example of an integration test</h3>
<p>The integration tests can be thought of as compound unit tests. Line list data is generated using <code>simulist::sim_linelist()</code>. In each testing block, a messy copy of the line list is made using <code>simulist::messy_linelist()</code> with arguments set to specifically target particular aspects of messyness; then a cleaning operation from {cleanepi} is applied targeting the messy element of the data; lastly, the cleaned line list is compared to the original complete and accurate simulated data. In other words, is the ideal data perfectly recovered when messied and cleaned?</p>
<p>An example of an integration test is shown below:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">set.seed</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)</span>
<span id="cb1-2">ll <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> simulist<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sim_linelist</span>()</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">test_that</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"convert_to_numeric corrects prop_int_as_word"</span>, {</span>
<span id="cb1-5">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># create messy data with 50% of integers converted to words</span></span>
<span id="cb1-6">  messy_ll <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> simulist<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">messy_linelist</span>(</span>
<span id="cb1-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">linelist =</span> ll,</span>
<span id="cb1-8">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop_missing =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span id="cb1-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop_spelling_mistakes =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span id="cb1-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">inconsistent_sex =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,</span>
<span id="cb1-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">numeric_as_char =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,</span>
<span id="cb1-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_as_char =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,</span>
<span id="cb1-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop_int_as_word =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>,</span>
<span id="cb1-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">prop_duplicate_row =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span></span>
<span id="cb1-15">  )</span>
<span id="cb1-16">  </span>
<span id="cb1-17">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># convert columns with numbers as words into numbers as numeric</span></span>
<span id="cb1-18">  clean_ll <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> cleanepi<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">convert_to_numeric</span>(</span>
<span id="cb1-19">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> messy_ll, </span>
<span id="cb1-20">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">target_columns =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"id"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>)</span>
<span id="cb1-21">  )</span>
<span id="cb1-22">  </span>
<span id="cb1-23">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># the below is not TRUE because</span></span>
<span id="cb1-24">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 1. `clean_ll` has an attribute used to store the report from the performed</span></span>
<span id="cb1-25">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># cleaning operation</span></span>
<span id="cb1-26">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 2. the converted "id" and "age" columns are numeric not integer</span></span>
<span id="cb1-27">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">expect_false</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">identical</span>(ll, clean_ll))</span>
<span id="cb1-28"></span>
<span id="cb1-29">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># check whether report is created as expected</span></span>
<span id="cb1-30">  report <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">attr</span>(clean_ll, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"report"</span>)</span>
<span id="cb1-31">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">expect_identical</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">names</span>(report), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"converted_into_numeric"</span>)</span>
<span id="cb1-32">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">expect_identical</span>(report<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>converted_into_numeric, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"id, age"</span>)</span>
<span id="cb1-33"></span>
<span id="cb1-34">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># convert the 2 converted numeric columns into integer</span></span>
<span id="cb1-35">  clean_ll[, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"id"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>)] <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">apply</span>(</span>
<span id="cb1-36">    clean_ll[, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"id"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"age"</span>)], </span>
<span id="cb1-37">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">MARGIN =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, </span>
<span id="cb1-38">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">FUN =</span> as.integer</span>
<span id="cb1-39">  )</span>
<span id="cb1-40"></span>
<span id="cb1-41">  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># remove report to check identical line list &lt;data.frame&gt;</span></span>
<span id="cb1-42">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">attr</span>(clean_ll, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"report"</span>) <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">NULL</span></span>
<span id="cb1-43">  </span>
<span id="cb1-44">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">expect_identical</span>(ll, clean_ll)</span>
<span id="cb1-45">})</span></code></pre></div></div>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>When developing multiple software tools that are explicitly designed to work together it is critical that they are routinely tested to ensure interoperability is maximised and maintained. These tests can be implementations of a data standard, or in the case of Epiverse-TRACE a more informal set of design principles. We have showcased integration testing with the compatibility of the {simulist} and {cleanepi} R packages, but there are other integration tests available in the {epiverse} meta-package. We hope that by regularly running these expectations of functioning pipelines, includes those as simple as two steps, like the case study show in this post, that maintainers and contributors will be aware of any interoperability breakages.</p>
<p>If you’ve worked on a suite of tools, R packages or otherwise, and have found useful methods or frameworks for integration tests please share in the comments.</p>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p>Thanks to Karim Mané, Hugo Gruson and Chris Hartgerink for helpful feedback when drafting this post.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{w._lambert2025,
  author = {W. Lambert, Joshua},
  title = {Integration Testing in {Epiverse-TRACE}},
  date = {2025-04-14},
  url = {https://epiverse-trace.github.io/posts/integration-testing/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-w._lambert2025" class="csl-entry quarto-appendix-citeas">
W. Lambert, Joshua. 2025. <span>“Integration Testing in
Epiverse-TRACE.”</span> April 14. <a href="https://epiverse-trace.github.io/posts/integration-testing/">https://epiverse-trace.github.io/posts/integration-testing/</a>.
</div></div></section></div> ]]></description>
  <category>open-source</category>
  <category>R</category>
  <category>R package</category>
  <category>testing</category>
  <category>interoperability</category>
  <category>ecosystem</category>
  <guid>https://epiverse-trace.github.io/posts/integration-testing/</guid>
  <pubDate>Mon, 14 Apr 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>simulist v0.5.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/simulist_v0.5.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/simulist">simulist</a> version v0.5.0. Here is an automatically generated summary of the changes in this version.</p>
<p>This minor version release expands the scope of <em>simulist</em> to include two new post-processing functions: <code>truncate_linelist()</code> and <code>messy_linelist()</code>. Both of these functions modify a line list <code>&lt;data.frame&gt;</code> from <code>sim_linelist()</code> or <code>sim_outbreak()</code>, the line list now also includes a <code>$date_reporting</code> column.</p>
<p>This release has also focused on making the package interface more consistent and contains bugs fixes.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<section id="external" class="level3">
<h3 class="anchored" data-anchor-id="external">External</h3>
<ul>
<li><p>The <code>messy_linelist()</code> function is added. This takes a simulated line list and creates a <em>“messy”</em> line list with inconsistencies, irregularities and missingness found in empirical outbreak data (#187 &amp; #196 &amp; #199)</p></li>
<li><p>A reporting delay argument (<code>reporting_delay</code>) is now included in <code>sim_linelist()</code> and <code>sim_outbreak()</code> to simulate reporting delays from the date of symptom onset (<code>$date_onset</code>) to date of reporting (<code>$date_reporting</code>) (#179).</p></li>
<li><p>The <code>truncate_linelist()</code> function is added. This takes a simulated line list and can create outbreak snapshots and right-truncation of real-time outbreak data (#179 &amp; #193 &amp; #201 &amp; #211).</p></li>
<li><p>A new vignette, <code>reporting_delays-truncation.Rmd</code>, on reporting delays and right-truncation for line list data has been added (#179 &amp; #201).</p></li>
<li><p>Alt text is added to all vignette figures (#214).</p></li>
</ul>
</section>
<section id="internal" class="level3">
<h3 class="anchored" data-anchor-id="internal">Internal</h3>
<ul>
<li><p><code>{english}</code> is added as a package dependency for <code>messy_linelist()</code> (#187).</p></li>
<li><p>R CMD check CI is now run on R v4.1, the minimum required R version for the package (#180).</p></li>
<li><p><code>{epiparameter}</code> is no longer used in testing (#177).</p></li>
<li><p><code>.check_linelist()</code> is added for input checking in post-processing functions (#179).</p></li>
<li><p><code>.check_age_df()</code> and <code>.check_risk_df()</code> have been merged into <code>.check_df()</code> thanks to the standardisation of the structure of <code>&lt;data.frame&gt;</code> objects required by <code>sim_*()</code> function arguments (#200).</p></li>
</ul>
</section>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li><p><code>create_config()</code> has been updated to accepted <code>function</code>s instead of a distribution name and a vector of parameters. This now matches the design of arguments that accept a <code>function</code> in <code>sim_*()</code> functions (#202).</p></li>
<li><p>The structure of the age-structured population <code>&lt;data.frame&gt;</code> input into <code>sim_*()</code> functions has been standardised with the age-stratified risk <code>&lt;data.frame&gt;</code>s by using an <code>$age_limit</code> column instead of an <code>$age_range</code> <code>character</code> column (#200).</p></li>
<li><p>The line list <code>&lt;data.frame&gt;</code> output by <code>sim_linelist()</code> and <code>sim_outbreak()</code> now contains a <code>$date_reporting</code> column (#179).</p></li>
<li><p>Outcome date (<code>$date_outcome</code>) is now conditioned to be after hospitalisation date (<code>$date_admission</code>) using the new internal <code>.sample_outcome_time()</code> function. This is a breaking change as previously hospitalisation times could be before outcome times, <code>sim_linelist()</code> can now through an error if an outcome time cannot be sampled to be after the hospitalisation time (#178).</p></li>
<li><p>The date of first contact is now sampled as the number of days before infection time (equal to symptom onset in the model) rather than days before date of last contact, as this could lead to the infection time before the first contact (#206).</p></li>
<li><p>The minimum required R version for <em>simulist</em> is increased to v4.1.0 from v3.6.0 due to package dependencies (#180).</p></li>
<li><p>The minimum required version of <code>{incidence2}</code> (suggested dependency) is now v2.3.0 (#214).</p></li>
</ul>
</section>
<section id="minor-changes" class="level2">
<h2 class="anchored" data-anchor-id="minor-changes">Minor changes</h2>
<ul>
<li>Explicitly state function output breaking changes policy in <code>design-principles.Rmd</code> vignette (#208).</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li><p>Date of symptom onset can no longer occur before date of first contact (#206).</p></li>
<li><p>Outcome date can no longer occur before hospitalisation date (#178).</p></li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p>Thanks to those that contributed towards this release, either through opening issues, reviewing pull requests or discussing package developments.</p>
<p><a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/CarmenTamayo">@CarmenTamayo</a> <a href="https://github.com/Degoot-AM">@Degoot-AM</a> <a href="https://github.com/jamesmbaazam">@jamesmbaazam</a> <a href="https://github.com/joshwlambert">@joshwlambert</a> <a href="https://github.com/Karim-Mane">@Karim-Mane</a> <a href="https://github.com/sbfnk">@sbfnk</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Simulist V0.5.0},
  date = {2025-03-26},
  url = {https://epiverse-trace.github.io/posts/simulist_v0.5.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Simulist
V0.5.0.”</span> March 26. <a href="https://epiverse-trace.github.io/posts/simulist_v0.5.0/">https://epiverse-trace.github.io/posts/simulist_v0.5.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/simulist_v0.5.0/</guid>
  <pubDate>Wed, 26 Mar 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Key considerations for retiring/superseding an R package</title>
  <dc:creator>James Mba Azam</dc:creator>
  <dc:creator>Hugo Gruson</dc:creator>
  <dc:creator>Sebastian Funk</dc:creator>
  <link>https://epiverse-trace.github.io/posts/superseding-bpmodels/</link>
  <description><![CDATA[ 





<p>Most of our work at Epiverse TRACE involves either developing an R package from scratch or adopting and maintaining an existing R package. In the former case, decision-making during development is guided by internal policies documented in the <a href="https://epiverse-trace.github.io/blueprints/">Epiverse-TRACE blueprints</a>. However, a less common scenario for us has been taking on the maintenance of an existing package — a situation we recently encountered with the <a href="https://epiforecasts.github.io/bpmodels/">bpmodels</a> R package.</p>
<p>In this post, I want to share some considerations and lessons learned from maintaining bpmodels, originally developed by Sebastian Funk at the London School of Hygiene &amp; Tropical Medicine (with contributions by Zhian Kamvar and Flavio Finger), and the decision to retire/supersede it with <a href="https://epiverse-trace.github.io/blueprints/">epichains</a>. The aim is not to define strict rules but to spark a conversation about good enough practices and alternative approaches that the R developer community has used or would like to be used more widely.</p>
<p>One of the first considerations was the scope of the package. When maintaining or re-imagining an R package, assessing its scope and identifying opportunities for refinement is crucial. For example, some packages have evolved significantly in the broader R ecosystem to better align with user needs. We will highlight a few examples. <a href="https://github.com/hadley/plyr">plyr</a> was split into <a href="https://dplyr.tidyverse.org/index.html">dplyr</a> and <a href="https://purrr.tidyverse.org/index.html">purrr</a> for manipulating data frame and list objects respectively, reflecting more specialized functionality based on object types. Similarly, reshape evolved into <a href="https://github.com/hadley/reshape">reshape2</a><sup>1</sup> and currently into <a href="https://tidyr.tidyverse.org/index.html">tidyr</a>, with each iteration simplifying and improving upon its predecessor. Another example is the <a href="https://github.com/njtierney/naniar/#a-note-on-the-name">renaming</a> of ggmissing into the more generalized <a href="https://naniar.njtierney.com/">naniar</a>. In the epidemiology ecosystem, two examples include the evolution of the <a href="https://epiforecasts.github.io/EpiNow/">EpiNow</a> into <a href="https://epiforecasts.github.io/EpiNow2/">EpiNow2</a> and <a href="https://www.repidemicsconsortium.org/incidence/">incidence</a> to <a href="https://www.reconverse.org/incidence2/index.html">incidence2</a>.</p>
<p>For bpmodels, we wanted to <a href="https://github.com/epiverse-trace/epichains/issues/142">unify the simulation functions</a> (existing as two functions previously) and improve the function signature by <a href="https://github.com/epiverse-trace/epichains/pull/33">renaming</a> several of the arguments for readability. We also wanted to <a href="https://github.com/epiverse-trace/epichains/issues/4">introduce an object-oriented workflow</a> to aid in interoperability (in some inputs and outputs) with existing tools such as <a href="https://www.repidemicsconsortium.org/epicontacts/">epicontacts</a> and <a href="https://epiverse-trace.github.io/epiparameter/">epiparameter</a>. Moreover, the object-oriented backend would also allow us to implement custom methods for printing, summarising and aggregating the simulation output. Some of these considerations would have been less disruptive and in line with the concept of progressive enhancement discussed in <a href="https://epiverse-trace.github.io/posts/progressive-enhancement/">a previous blogpost</a>. However, the change in function name and signature would have led to a lot of disruptions including <a href="https://r-pkgs.org/lifecycle.html#deprecating-a-function">deprecating</a> the existing functions and arguments.</p>
<p>One thing is clear from the examples on scope changes - they often lead to name changes. Another important decision was whether to rebrand the package with a new name. A new name can signal a fresh approach and address limitations of the original package. The most popular example is the renaming of ggplot to <a href="https://ggplot2.tidyverse.org/index.html">ggplot2</a>. Others include renaming reshape to reshape2 and further, tidyr. However, changing a package’s name can be disruptive and cause <a href="https://r-pkgs.org/lifecycle.html#sec-lifecycle-breaking-change-definition">breaking changes</a> in downstream packages or workflows that use them. The process, if not well handled, can lead to confusion and frustration in the user and developer community. With this in mind and to enable reproducibility of existing work using bpmodels, we decided to fork the <a href="https://epiforecasts.github.io/bpmodels/">bpmodels</a> repository to the Epiverse-TRACE GitHub organisation and maintain the old package. At the same time, we introduced epichains as the successor. The name reflects the fact that it is a package for simulating and analysing <em>epidemiological transmission chains</em>.</p>
<p>A second key consideration is the plans that the original package author(s) may have had and their views on any future changes. In our case, this was fairly straightforward because the maintainer of the original package was fully involved in the refactoring process. We were able to reach and receive approval from another package author who had made substantial contributions. More generally, however, bringing all package authors on board with, for example, changes in scope and name is an important step in taking on maintenance of a package and one that should not be neglected.</p>
<p>We also had to consider whether to archive bpmodels or allow it to co-exist with epichains. We decided to keep bpmodels accessible to sustain the reproducibility of existing code using the package. The package was moved back to the epiforecasts <a href="https://epiforecasts.github.io/bpmodels/">GitHub organisation</a> where it originated from. We, however, added a <a href="https://github.com/epiforecasts/bpmodels/blob/main/README.Rmd#L19">lifecycle badge</a> to communicate the package’s retired status and text in the README about <a href="https://github.com/epiforecasts/bpmodels/blob/main/README.Rmd#L29">our plans</a> to only maintain the required infrastructure to keep the package running but not to add any new features.</p>
<p>Another technical consideration was how to handle previous contributions recorded as commit histories. When forking a package, it’s important to decide whether to retain the commit history. Options include squashing the history to start with a clean slate, which risks losing visibility of past contributions, or tagging the HEAD commit of the original repository and building from there. For bpmodels, we decided to go with the second approach, which allowed us to keep the GitHub commit history intact to retain the contributions of its original authors.</p>
<p><a href="https://semver.org/">Semantic versioning</a> was another <a href="https://github.com/epiverse-trace/epichains/issues/32">key decision point</a>. Since epichains was not going to be available immediately but would be developed in the open (on GitHub), we needed to consider how to communicate that to potential users. We decided to start at version <code>0.0.0.9999</code> to signal an experimental and unstable phase<sup>2</sup> while iterating on features through <a href="https://github.com/epiverse-trace/epichains/releases/tag/v0.1.0">minor releases</a>.</p>
<p>Throughout this process, we drew inspiration from various sources. Hadley Wickham’s <a href="https://github.com/hadley/reshape/blob/master/README.md#introduction">reasoning</a> for reshape2 as a reboot of reshape and Nicholas Tierney’s <a href="https://github.com/njtierney/naniar/#a-note-on-the-name">reason</a> for renaming ggmissing to naniar were helpful. Additionally, a talk at UseR! 2024 entitled <a href="https://userconf2024.sched.com/event/1c90V/r-evolution-the-retirement-of-r-packages-with-many-reverse-dependencies-edzer-pebesma-university-of-muenster-roger-bivand-norwegian-school-of-economics">“retiring packages with extensive reverse dependencies”</a> offered practical advice.</p>
<p>This transition has raised several questions for the community. How do you decide whether to supersede or deprecate a package? What strategies have worked for maintaining backward compatibility while introducing new tools? How do you document and communicate major changes to users? How is all of this done while appropriately crediting past contributions and retain discoverability and citation/use tracking?</p>
<p>We’d love to hear your thoughts and experiences. Let’s start a conversation about maintaining and evolving open-source tools in a sustainable way.</p>




<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>Notice the URL points to <a href="https://github.com/hadley/reshape">reshape</a> instead of reshape2 although the README mentions the latter. The README however lays out the reasons for the evolution.↩︎</p></li>
<li id="fn2"><p>See more details on R package versioning and what they communicate in the <a href="https://r-pkgs.org/lifecycle.html#sec-lifecycle-evolution">R packages book</a>.↩︎</p></li>
</ol>
</section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{mba_azam2025,
  author = {Mba Azam, James and Gruson, Hugo and Funk, Sebastian},
  title = {Key Considerations for Retiring/Superseding an {R} Package},
  date = {2025-02-03},
  url = {https://epiverse-trace.github.io/posts/superseding-bpmodels/},
  doi = {10.59350/zabx5-3x070},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-mba_azam2025" class="csl-entry quarto-appendix-citeas">
Mba Azam, James, Hugo Gruson, and Sebastian Funk. 2025. <span>“Key
Considerations for Retiring/Superseding an R Package.”</span> February
3. <a href="https://doi.org/10.59350/zabx5-3x070">https://doi.org/10.59350/zabx5-3x070</a>.
</div></div></section></div> ]]></description>
  <category>software lifecycles</category>
  <category>R</category>
  <category>R package</category>
  <category>software design</category>
  <category>DOI</category>
  <guid>https://epiverse-trace.github.io/posts/superseding-bpmodels/</guid>
  <pubDate>Mon, 03 Feb 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>superspreading v0.3.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/superspreading_v0.3.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/superspreading">superspreading</a> version v0.3.0. This is the first version of superspreading to be on <a href="https://cran.r-project.org/package=superspreading">CRAN</a> (the package can now be installed with <code>install.packages()</code>). Here is an automatically generated summary of the changes in this version.</p>
<p>The third minor release of the <em>superspreading</em> package contains enhancements to several functions and a new vignette.</p>
<p>We are also pleased to welcome Dillon Adam (<a href="https://github.com/dcadam"><span class="citation" data-cites="dcadam">@dcadam</span></a>) as a new package author for his contributions towards this version.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li>The <code>proportion_transmission()</code> function has been expanded to incorporate a new method. The new method calculates the proportion of transmission from X% the most infectious individuals, corresponding to the <a href="https://doi.org/10.1038%2Fnature04153">Lloyd-Smith et al.&nbsp;(2005)</a> calculation. The <code>proportion_transmission()</code> has a new <code>method</code> argument to toggle between the two calculations (<span class="citation" data-cites="dcadam">@dcadam</span>, #99).</li>
<li>A new vignette explaining the methods in the <code>proportion_transmission()</code> function (#101).</li>
<li>{bpmodels} is removed as a package dependency and a branching process simulation function, modified from <code>bpmodels::chain_sim()</code>, is added to the {superspreading} package (#103). <span class="citation" data-cites="sbfnk">@sbfnk</span> is added as copyright holder and <span class="citation" data-cites="jamesmbaazam">@jamesmbaazam</span> as a contributor.</li>
<li><code>probability_contain()</code> is enhanced to enable to probability of containment within a certain amount of time since the outbreak started. This adds <code>outbreak_time</code> and <code>generation_time</code> arguments to <code>probability_contain()</code>. This addition is backwards compatible as by default the time is unlimited, <code>outbreak_time = Inf</code>, and no generation time is required.</li>
</ul>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li>The <code>stochastic</code> argument in <code>probability_contain()</code> has been renamed <code>simulate</code> to be consistent with other functions (#103).</li>
</ul>
</section>
<section id="minor-changes" class="level2">
<h2 class="anchored" data-anchor-id="minor-changes">Minor changes</h2>
<ul>
<li>The proportions output of <code>proportion_*()</code> functions are now formatted to significant figures rather than rounding to prevent small values being rounded to zero (#102).</li>
<li>Improve input checking, error messages and edge case handling for functions (#102).</li>
<li>Vignettes now use <code>rmarkdown::html_vignette</code> instead of <code>bookdown::html_vignette2</code> and <code>as_is: true</code> has been removed due to changes to {pkgdown} in v2.1.0. {bookdown} has been removed as a suggested package and code folding is removed from vignettes. KaTeX headers have been added to <code>_pkgdown.yml</code> for correct math rendering (#104 &amp; #109).</li>
<li>The <code>get_epidist_params()</code> internal function has been renamed <code>get_epiparameter_params()</code> since {epiparameter} renamed the <code>&lt;epidist&gt;</code> class to <code>&lt;epiparameter&gt;</code> (#100).</li>
<li>Internal constants have been added to the package and used by functions (#111).</li>
<li>Checking if the user specifies individual parameters (<code>R</code> and <code>k</code>) or provides an <code>&lt;epiparameter&gt;</code> object is now in <code>.check_input_params()</code> (#111).</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>None to {superspreading} functions.</li>
<li>Update {epiparameter} use in vignette and tests (#106).</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/dcadam">@dcadam</a> <a href="https://github.com/joshwlambert">@joshwlambert</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Superspreading V0.3.0},
  date = {2025-01-28},
  url = {https://epiverse-trace.github.io/posts/superspreading_v0.3.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Superspreading
V0.3.0.”</span> January 28. <a href="https://epiverse-trace.github.io/posts/superspreading_v0.3.0/">https://epiverse-trace.github.io/posts/superspreading_v0.3.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/superspreading_v0.3.0/</guid>
  <pubDate>Tue, 28 Jan 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Licensing R packages with code and data: learnings from submitting to CRAN</title>
  <dc:creator>Joshua Lambert</dc:creator>
  <dc:creator>Chris Hartgerink</dc:creator>
  <link>https://epiverse-trace.github.io/posts/data-licensing-cran.html</link>
  <description><![CDATA[ 





<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>This is a follow-up blog post to the <a href="data-licensing.html"><em>Dual licensing R packages with code and data</em></a> post published in September 2024. It contains learnings from submitting <strong>epiparameter</strong> to CRAN with a dual license.</p>
</div>
</div>
<section id="overview-of-previous-blog-post-on-r-package-licensing" class="level3">
<h3 class="anchored" data-anchor-id="overview-of-previous-blog-post-on-r-package-licensing">Overview of previous blog post on R package licensing</h3>
<p>We previously published a <a href="data-licensing.html">post on the Epiverse-TRACE blog discussing the importance of licensing code and data for open source</a>. It covered the differences between open source licenses for code and those that are required for other forms of information, in our case, data. R packages most commonly distribute code, and therefore require an <a href="https://cran.r-project.org/doc/FAQ/R-exts.html#Licensing">appropriate open source license</a>. Less frequently, R packages are used to bundle and share data, so-called <a href="https://r-pkgs.org/data.html">“data packages”</a>, and require an applicable license for reuse and redistribution. We recommend reading <a href="data.licensing.html">the original blog post</a> for a more in-depth explanation of each of these points.</p>
<p>However, since publishing the original post, the last section, <em>Licensing code and data in one R package</em>, has become outdated given our experience submitting the epiparameter package to CRAN with a dual-license. This blog post provides an updated <em>Licensing code and data in one R package</em> section with learnings from epiparameter package development and CRAN submission.</p>
</section>
<section id="licensing-code-and-data-in-one-r-package" class="level3">
<h3 class="anchored" data-anchor-id="licensing-code-and-data-in-one-r-package">Licensing code and data in one R package</h3>
<p>If you are developing an R package that has both code and data as primary objects of (roughly) equal importance, a software license inadequately covers the data, and a data license inadequately covers the code. Dual licensing can help resolve this issue. This means there is one license for code (for example, <a href="https://mit-license.org">MIT license</a>) and another license for the included data (for example, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt">Public Domain Dedication</a>).</p>
<p>After conducting an online search, dual licensing for R packages seems rare. An interesting example of dual licensing is the <a href="https://github.com/igraph/igraphdata/blob/main/LICENSE"><strong>igraphdata</strong> package</a>, which contains several licenses: One for each dataset included in the package. Similar to igraphdata, we dual licensed the <a href="https://github.com/epiverse-trace/epiparameter"><strong>epiparameter</strong> package</a>, which until versus v0.4.0 contained both code and data. We <a href="https://github.com/epiverse-trace/epiparameter/blob/v0.3.0/DESCRIPTION#L28">licensed the code using the <code>DESCRIPTION</code> file</a> and used <a href="https://github.com/epiverse-trace/epiparameter/blob/v0.3.0/LICENSE">the <code>LICENSE</code> file</a> to license the data under CC0. Concretely, we included this additional text in <code>LICENSE</code> to clarify the dual license and that we recommend citing the original source regardless:</p>
<blockquote class="blockquote">
<p>All data included in the epiparameter R package is licensed under CC0 (<a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt" class="uri">https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt</a>). This includes the parameter database (extdata/parameters.json) and data in the data/ folder. Please cite the individual parameter entries in the database when used.</p>
</blockquote>
<p>However, upon submission of epiparameter to CRAN, the dual licensing approach was rejected. The CRAN package reviewer stated:</p>
<blockquote class="blockquote">
<p>A package can only be licensed as a whole. It can have a single license or a set of <em>alternative</em> licenes. If the data have to be licensed differently then the code, you have to provide the data in a separate data package with the other license.</p>
</blockquote>
<p>Therefore, we decided to separate the data, originally stored in epiparameter, into a package called <a href="https://github.com/epiverse-trace/epiparameterDB"><strong>epiparameterDB</strong></a>. This package is solely <a href="https://github.com/epiverse-trace/epiparameterDB/blob/main/DESCRIPTION#L15">licensed under CC0</a>, and epiparameter can then also be solely <a href="https://github.com/epiverse-trace/epiparameter/blob/main/DESCRIPTION#L28">licensed under MIT</a>. Both packages are now hosted on CRAN using a single license dedicated to code or data.</p>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
</div>
</div>
<div class="callout-body-container callout-body">
<p>It is often desirable to host an R package on CRAN as it enables it to be easily installed (from binary if on Mac or Windows), it gives the package some validity as a non-trivial and secure piece of software to install and use.</p>
<p>It is not necessary nor beneficial for all R packages to be hosted on CRAN, and it does come with some drawbacks, such as the dual licensing restriction of code and data, but for our case with the epiparameter package, we deemed it better to host on CRAN and split the code and data into epiparameter and epiparameterDB, respectively.</p>
</div>
</div>
<p>When including data in your R package from other sources it is important to check that the license of your package and the data is compatible<sup>1</sup>, or that the individual data license is clearly stated, as in igraphdata. For epiparameterDB, we consider model estimates as facts (that is, not copyrightable).</p>
<hr>
<p>This blogpost provides an addendum to our original post <a href="data-licensing.html">Dual licensing R packages with code and data</a>, providing our experience and outcomes from submitting epiparameter – and the resulting epiparmeterDB package – to CRAN in a conformant manner. In addition to the requirements and benefits of open source licensing of open software and data in the first post, we hope this follow-up post provides practical information that will be of use to other R package developers, or software developers and open data curators more broadly.</p>


</section>


<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>See <a href="https://juliasilge.com/blog/sentiment-lexicons/">this blog post by Julia Silge on including external data sets into an R package and rectifying incompatibilities with license</a>↩︎</p></li>
</ol>
</section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{lambert2025,
  author = {Lambert, Joshua and Hartgerink, Chris},
  title = {Licensing {R} Packages with Code and Data: Learnings from
    Submitting to {CRAN}},
  date = {2025-01-20},
  url = {https://epiverse-trace.github.io/posts/data-licensing-cran.html},
  doi = {10.59350/afsfa-bx908},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-lambert2025" class="csl-entry quarto-appendix-citeas">
Lambert, Joshua, and Chris Hartgerink. 2025. <span>“Licensing R Packages
with Code and Data: Learnings from Submitting to CRAN.”</span> January
20. <a href="https://doi.org/10.59350/afsfa-bx908">https://doi.org/10.59350/afsfa-bx908</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>open-source</category>
  <category>package development</category>
  <category>DOI</category>
  <guid>https://epiverse-trace.github.io/posts/data-licensing-cran.html</guid>
  <pubDate>Mon, 20 Jan 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>simulist v0.4.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/simulist_v0.4.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/simulist">simulist</a> version v0.4.0. This is the first version of simulist to be on <a href="https://cran.r-project.org/package=simulist">CRAN</a> (the package can now be installed with <code>install.packages()</code>). Here is an automatically generated summary of the changes in this version.</p>
<p>A minor version release of <em>simulist</em> containing various minor improvements to the functions and documentation, as well as removing some triggers for warning users. There are also a few bug fixes and internal enhancements.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<section id="external" class="level3">
<h3 class="anchored" data-anchor-id="external">External</h3>
<ul>
<li>Defaults have been added to all <code>sim_*()</code> arguments that previously did not have one. Allowing functions to be run without specifying any arguments (e.g.&nbsp;<code>linelist &lt;- sim_linelist()</code>) (#149).</li>
<li>Documentation for <code>sim_*()</code> function arguments that accept either a <code>function</code> or an <code>&lt;epiparameter&gt;</code> object has been improved (#149).</li>
<li><code>sim_*()</code> functions no longer warn if the user has not specified <code>*_risk</code> arguments and have set <code>onset_to_*</code> arguments to <code>NULL</code> (#149).</li>
<li>All vignettes now use <code>rmarkdown::html_vignette</code> for to correctly render the website and for maximum compatibility with {pkgdown} &gt;= 2.1.0. This removes figure numbering and code folding (#153).</li>
</ul>
</section>
<section id="internal" class="level3">
<h3 class="anchored" data-anchor-id="internal">Internal</h3>
<ul>
<li><code>.add_hospitalisation()</code> has been vectorised following <code>.add_outcome()</code> in PR #101 (#150).</li>
</ul>
</section>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li>The function arguments <code>infect_period</code> and <code>prob_infect</code> have been renamed <code>infectious_period</code> and <code>prob_infection</code> (#143).</li>
<li><code>sim_*()</code> functions now use <code>NULL</code> instead of <code>NA</code> to turn off processes (e.g.&nbsp;<code>onset_to_death = NULL</code> for no deaths) (#148).</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>A new function, <code>.sample_infect_period()</code> is added that errors if the infectious period function generates a negative number (#142).</li>
<li><code>sim_linelist()</code> no longer errors when <code>hosp_death_risk</code> is <code>NULL</code> and <code>onset_to_death</code> is parameterised as a delay distribution (#144).</li>
<li><code>.add_ct()</code> generates the correct number of values and does not duplicate Ct values due to vector recycling (#158).</li>
<li>Update {epiparameter} usage (#159).</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/joshwlambert">@joshwlambert</a> <a href="https://github.com/Karim-Mane">@Karim-Mane</a> <a href="https://github.com/sbfnk">@sbfnk</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Simulist V0.4.0},
  date = {2025-01-10},
  url = {https://epiverse-trace.github.io/posts/simulist_v0.4.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Simulist
V0.4.0.”</span> January 10. <a href="https://epiverse-trace.github.io/posts/simulist_v0.4.0/">https://epiverse-trace.github.io/posts/simulist_v0.4.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/simulist_v0.4.0/</guid>
  <pubDate>Fri, 10 Jan 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>epiparameter v0.4.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/epiparameter_v0.4.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/epiparameter">epiparameter</a> version v0.4.0. This is the first version of epiparameter to be on <a href="https://cran.r-project.org/package=epiparameter">CRAN</a> (the package can now be installed with <code>install.packages()</code>). Here is an automatically generated summary of the changes in this version.</p>
<p>The fourth minor release of the {epiparameter} focuses on splitting the code and data, with the data being moved into a separate R package: <a href="https://CRAN.R-project.org/package=epiparameterDB">{epiparameterDB}</a>. There are also some minor additional improvements focusing on printing and plotting.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li>The library of epidemiological parameters (<code>parameters.json</code>) has been removed from the {epiparameter} package and moved to the {epiparameterDB} R package which is taken on as a dependency. The {epiparameter} package is licensed solely as MIT with dual licensing with CC0 removed (#415).</li>
<li>The data dictionary (<code>data_dictionary.json</code>) and JSON validation workflow (<code>validate-json.yaml</code>) have been removed from the package (#415).</li>
<li>The library of epidemiological parameters is cached (using <a href="https://CRAN.R-project.org/package=cachem">{cachem}</a>) on loading the package to reduce the runtime of <code>epiparameter_db()</code> (#417).</li>
<li>The <code>print()</code> and <code>format()</code> methods for the <code>&lt;epiparameter&gt;</code> class have been improved to show the units of parameter estimates, as well as summary statistics, if available, for unparameterised <code>&lt;epiparameter&gt;</code> objects (#419).</li>
<li><code>on.exit()</code> is no longer called in plotting functions to allow user-specified graphical parameters to not be overwritten (#420).</li>
<li>A <code>plot()</code> method for the <code>&lt;multi_epiparameter&gt;</code> class is added. This enables a list of <code>&lt;epiparameter&gt;</code> objects with continuous distributions to be compared on a single plot (#425).</li>
<li>A <code>lines()</code> method for the <code>&lt;epiparameter&gt;</code> class is added (#425).</li>
</ul>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>A bug in <code>is_continuous()</code> causing it to incorrectly returning <code>FALSE</code> for <code>&lt;epiparameter&gt;</code> objects with normal distributions is fixed (#422).</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/joshwlambert">@joshwlambert</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2025,
  author = {Epiverse-TRACE development team, The},
  title = {Epiparameter V0.4.0},
  date = {2025-01-08},
  url = {https://epiverse-trace.github.io/posts/epiparameter_v0.4.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2025" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2025. <span>“Epiparameter
V0.4.0.”</span> January 8. <a href="https://epiverse-trace.github.io/posts/epiparameter_v0.4.0/">https://epiverse-trace.github.io/posts/epiparameter_v0.4.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/epiparameter_v0.4.0/</guid>
  <pubDate>Wed, 08 Jan 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>How well prepared are we to rapidly analyse a new influenza pandemic? A brief perspective on analysis conducted for UK government advisory groups during COVID-19</title>
  <dc:creator>Adam Kucharski</dc:creator>
  <link>https://epiverse-trace.github.io/posts/covid-analysis/</link>
  <description><![CDATA[ 





<p>With <a href="https://www.youtube.com/watch?v=i4frpQJMfn8">multiple reports</a> of influenza H5N1 cases that have no clear animal exposure, it is useful to consider what kinds of analysis would be required in the event of a new influenza pandemic, and how easily this could be performed. As a starting point, this post reflects on some of the real-time work my colleagues and I contributed to inform the UK response to COVID-19.</p>
<section id="reflections-on-covid-19-contributions" class="level2">
<h2 class="anchored" data-anchor-id="reflections-on-covid-19-contributions">Reflections on COVID-19 Contributions</h2>
<p>During COVID-19, academic participants like myself in the UK contributed analysis to the <a href="https://www.gov.uk/government/publications/scientific-advisory-group-for-emergencies-sage-coronavirus-covid-19-response-membership/list-of-participants-of-sage-and-related-sub-groups">SPI-M-O advisory group</a>, which focused on epidemiology and modelling. This was a subgroup of the <a href="https://www.gov.uk/government/publications/about-sage-and-covid-19/about-sage-and-covid-19">Scientific Advisory Group for Emergencies</a>.</p>
<p>These contributions typically fell into two main categories:</p>
<ul>
<li>Reports in response to specific questions from the Secretariat (e.g.&nbsp;exploring implications of policy options).</li>
<li>Reports or preliminary results detailing broader epidemiological insights about COVID-19 my colleagues and I thought were noteworthy (e.g.&nbsp;unusual patterns with novel variants).</li>
</ul>
<p>This post focuses on the analysis reports that I made a major contribution to as a member of SPI-M-O in the first 18 months after COVID was identified as a threat, i.e.&nbsp;between Jan 2020 and July 2021 (a full list has <a href="https://www.covid19.public-inquiry.uk/documents/inq000056464-rule-9-questionnaire-response-from-prof-adam-kucharski-scientific-advisory-group-for-emergencies-sage-scientific-pandemic-influenza-group-on-modelling-spi-m-o-undated/">previously been published</a>). Narrative reports or analysis that did not involve substantial analytics or modelling (e.g.&nbsp;just direct plots of data) are not included here. I also include some major early piece of analysis that did not form SPI-M-O reports, but were published and informed subsequent analysis and modelling.</p>
<p>If another pandemic were to hit, how easily and quickly could we do these analyses again? To document where we currently are, it is important to understand where potential gaps and bottlenecks are. For each report, I therefore review three main criteria:</p>
<ol type="1">
<li><strong>Code availability</strong>: is the original analysis code public? (With link if relevant, or context if not.)</li>
<li><strong>Package availability</strong>: is the analysis code or underlying method currently packaged up for easy reuse?</li>
<li><strong>Task readiness time</strong>: roughly how long would it take to get the code or package into a rough state where it could re-run an equivalent analysis using the characteristics of a future transmissible H5N1 influenza? And how long to do so while also following robust best practice <a href="https://epiverse-trace.github.io/blueprints/">Epiverse-TRACE development principles</a>, so others can easily build on the analysis? Would it take minutes (i.e.&nbsp;possible to run immediately), hours, days or weeks to get the basic functionality working?</li>
</ol>
<p>Criteria (1) and (2) are either marked as available (✅), not available (❌), or partially available (⏳). Time taken is also divided into ‘rough’ (rapid, imperfect code to deliver a task) and ‘robust’ (i.e.&nbsp;best practice development for future re-use) to reflect wider discussions about <a href="https://samabbott.co.uk/posts/2022-09-19-80-percent-good-enough/">what constitutes ‘good enough’ work in a pandemic</a>. I also suggest some areas for potential further development, or links to ongoing development that will enable easier completion of tasks in future. The focus of the post tends to be packages that sit on the CMMID, Epiverse-TRACE, Epiforecasts or my GitHub repositories, because these were most directly related to the tasks being discussed, but some wider packages are also signposted.</p>
<p>This is not an exclusive list of work performed by myself and colleagues in the Centre for Mathematical Modelling of Infectious Diseases at LSHTM; there is a larger <a href="https://cmmid.github.io/topics/covid19/">CMMID repository of real-time work</a>, as well as a large volume of published papers in academic journals and reports on the gov.uk website. However, I hope this initial post can provide a useful summary of tasks that were performed, and framework for evaluating wider efforts required for a pandemic.</p>
<p>The overall effectiveness of the UK response, and which areas could be strengthened, are topics currently being examined by the COVID Inquiry, and will not be covered here. If readers are interested, there are some broader reflections from members of the UK modelling community, and recommendations for improvements, in <a href="https://doi.org/10.12688/wellcomeopenres.19601.1">Sherratt et al, 2024, Wellcome Open Research</a>.</p>
<section id="jan-2020-early-estimation-of-transmissibility-and-control" class="level3">
<h3 class="anchored" data-anchor-id="jan-2020-early-estimation-of-transmissibility-and-control">28 Jan 2020: Early estimation of transmissibility and control</h3>
<p><a href="https://github.com/adamkucharski/2020-ncov">Code</a> ✅ | Package ⏳ | Days (rough), Weeks (robust)</p>
<p>This analysis in early 2020 focused on estimation of transmissiblity and subsequent effect of lockdown control measures, and brought together reported cases in China, exported cases identified internationally, and infections detected on evacuation flights. A stochastic SEIR model was fitted with sequential Monte Carlo to estimate how <img src="https://latex.codecogs.com/png.latex?R_t"> varied over time, to distinguish between an epidemic that ended because of control vs immunity. Later published as <a href="https://www.thelancet.com/article/S1473-3099(20)30144-4/fulltext">Kucharski et al, Lancet Inf Dis, 2020</a>.</p>
<p>The code used to generate estimates for the probability of a large outbreak given <img src="https://latex.codecogs.com/png.latex?R_0"> are now available in the Epiverse-TRACE <a href="https://epiverse-trace.github.io/superspreading/">{superspreading}</a> package.</p>
<p><strong>Suggested or ongoing development:</strong> There are now much more efficient methods for performing the main real-time inference analysis, particularly the <a href="https://github.com/mrc-ide/dust">{dust}</a> toolkit in combination with <a href="https://mrc-ide.github.io/mcstate/">{mcstate}</a>. As future tools will have to be flexible enough to be applicable in a wide range of modelling scenarios with different data sources, the main ongoing task is to ensure these are well documented and have been tested with relevant examples that can serve as templates for future work. The <a href="https://github.com/LloydChapman/seir">{seir} package</a> is collating a library of simple model fitting implementations and a <a href="https://github.com/LloydChapman/seir/tree/early-wuhan">branch</a> has implemented estimation of a fixed <img src="https://latex.codecogs.com/png.latex?R_0"> value in an SEIR model using early exported COVID cases. The next step would be to implement an example with a time-varying reproduction number.</p>
</section>
<section id="feb-2020-early-analysis-of-contact-tracing-effectiveness" class="level3">
<h3 class="anchored" data-anchor-id="feb-2020-early-analysis-of-contact-tracing-effectiveness">2 Feb 2020: Early analysis of contact tracing effectiveness</h3>
<p><a href="https://github.com/cmmid/ringbp">Code</a> ✅ | <a href="https://github.com/epiforecasts/ringbp">Package</a> ✅ | Hours (rough), Days (robust)</p>
<p>Another early analysis was a paper for SPI-M-O: <strong>Feasibility of controlling 2019-nCoV outbreaks by isolation of cases and contacts</strong>, later published as <a href="https://www.thelancet.com/article/S2214-109X(20)30074-7/fulltext">Hellewell et al, Lancet Global Health (2020)</a>. It used a branching process model to explore how transmission (e.g.&nbsp;<img src="https://latex.codecogs.com/png.latex?R_0"> and % presymptomatic transmission) and control parameters (e.g.&nbsp;% contacts traced) could influence the risk of a large outbreak.</p>
<p><strong>Suggested or ongoing development:</strong> There are several issues on the <a href="https://github.com/epiforecasts/ringbp">{ringbp}</a> package repo that, once complete, would allow for faster implementation for new pathogens, especially in combination with <a href="https://epiverse-trace.github.io/epiparameter/">{epiparameter}</a>. The <a href="https://github.com/bcgov/epi.branch.sim/">{epi.branch.sim}</a> package, which is based on the Hellewell et al paper, also offers an arguably more developed package for plug-and-play analysis in the meantime. The <a href="https://epiverse-trace.github.io/epichains/">{epichains}</a> package also allows for estimation of simpler branching processes (i.e.&nbsp;without targeted control like contact tracing).</p>
</section>
<section id="mar-2020-early-estimation-of-severity" class="level3">
<h3 class="anchored" data-anchor-id="mar-2020-early-estimation-of-severity">3 Mar 2020: Early estimation of severity</h3>
<p><a href="https://github.com/thimotei/cCFRDiamondPrincess">Code</a> ✅ | <a href="https://github.com/epiverse-trace/cfr/">Package</a> ✅ | Hours (rough), Days (robust)</p>
<p>This analysis estimated the infection and case fatality ratio by age for COVID-19 using age-adjusted data from the outbreak on the Diamond Princess cruise ship. Later published as <a href="https://www.eurosurveillance.org/content/10.2807/1560-7917.ES.2020.25.12.2000256">Russell et al, Eurosurveillance, 2020</a>.</p>
<p>The methods used for this analysis are now implemented as the Epiverse-TRACE <a href="https://github.com/epiverse-trace/cfr/">{cfr}</a> package. There is also a <a href="https://epiverse-trace.github.io/howto/analyses/estimate_severity/cfr-stratified-severity.html">‘how to’ example for age-specific CFR estimation</a>.</p>
<p><strong>Suggested or ongoing development:</strong> There are several <a href="https://github.com/epiverse-trace/cfr/issues">GitHub issues</a> open that aim to strengthen {cfr}, especially for edge cases (e.g.&nbsp;very high CFR) or uncertainty when estimating underascertainment.</p>
</section>
<section id="mar-2020-pre-covid-social-mixing-patterns" class="level3">
<h3 class="anchored" data-anchor-id="mar-2020-pre-covid-social-mixing-patterns">11 Mar 2020: pre-COVID social mixing patterns</h3>
<p><a href="https://www.medrxiv.org/content/10.1101/2020.02.16.20023754v2.supplementary-material">Data</a> ✅ | Package ❌ | Hours (rough), Days (robust)</p>
<p>Another early paper for SPI-M-O focused on social mixing patterns in the UK from the 2017/18 BBC public science project: <strong>Some results from the BBC project on contact rates by context and age</strong>, later expanded into <a href="https://www.medrxiv.org/content/10.1101/2020.02.16.20023754v2">Klepac et al, MedRxiv, 2020</a>. The underlying contact matrices were made available alongside the paper.</p>
<p><strong>Suggested or ongoing development:</strong> It would be useful to incorporate data into <a href="https://epiforecasts.io/socialmixr/">{socialmixr}</a> to enable easy re-use in R. There is also an <a href="https://github.com/epiverse-trace/finalsize/issues/216">issue to add eigenvector calculation</a>, alongside the <img src="https://latex.codecogs.com/png.latex?R_t"> calculation already implemented in the {finalsize} package, to illustrate which age groups drive early epidemic growth. There is also an <a href="https://github.com/epiverse-trace/tutorials-late/pull/63">incoming training episode</a> on contact matrices.</p>
</section>
<section id="mar-2020-onwards-early-population-level-scenarios" class="level3">
<h3 class="anchored" data-anchor-id="mar-2020-onwards-early-population-level-scenarios">3 Mar 2020 onwards: Early population-level scenarios</h3>
<p><a href="https://github.com/cmmid/covid-uk">Code</a> ✅ | Package ✅ | Hours (rough), Days (robust)</p>
<p>A collection of population-level scenario modelling reports generated between February and April 2020 was later published as a summary paper, <a href="https://www.thelancet.com/journals/lanpub/article/PIIS2468-2667(20)30133-X/fulltext">Davies et al, Lancet Public Health, 2020</a>. The original model, known as <code>covidm</code>, had a code base that would be reused for multiple epidemic waves, including novel variants. However, many the basic scenarios can be now be explored using the Epiverse-TRACE <a href="https://epiverse-trace.github.io/epidemics/">{epidemics}</a>. In particular, {epidemics} can simulate scenarios with multiple overlapping interventions targeting different age groups, and reflect uncertainty in <img src="https://latex.codecogs.com/png.latex?R_0">. A version of this package has already been used to <a href="https://gaza-projections.org/">project future outbreak scenarios in Gaza</a>.</p>
<p>Some further reflections on specific pieces of COVID analysis for SPI-M-O in 2020 are listed below:</p>
<ul>
<li>3 March. <a href="https://www.gov.uk/government/publications/the-effect-of-social-distance-measures-on-deaths-and-peak-demand-for-hospital-services-in-england-3-march-2020"><strong>Effect of social distancing measures on deaths &amp; peak demand for hospitals in England.</strong></a> <strong>Suggested or ongoing development:</strong> Although {epidemics} is set up to simulate infections, there is currently no database for burden to draw on (e.g.&nbsp;easy conversion to hospitalisations and deaths). The WHO Hub <a href="https://github.com/WHO-Collaboratory/simex">simex model</a> has some functions for converting COVID cases to disease outcomes, but this could be a useful feature to include for a wider range of pathogens. Burden estimation is also planned in the <a href="https://github.com/epiverse-trace/tutorials-late/issues/54">Epiverse-TRACE late stage tutorials</a>.</li>
<li>8 March. <strong>Estimating the impact of regional triggers for COVID-19 non-pharmaceutical interventions.</strong></li>
<li>11 March. <a href="https://www.gov.uk/government/publications/the-impact-of-aggressively-managing-peak-incidence-11-march-2020"><strong>Impact of agressively managing peak incidence.</strong></a>. <strong>Suggested or ongoing development:</strong> This analysis included epidemic-dependent triggers (e.g.&nbsp;close venues once hospitalisations hit a certain level), which are not yet included in {epidemics}.</li>
<li>11 March. <a href="https://www.gov.uk/government/publications/the-impact-of-banning-sporting-events-and-other-leisure-activities-on-the-covid-19-epidemic-11-march-2020"><strong>Impact of banning sporting events and other leisure activities on Covid-19 epidemic.</strong></a></li>
<li>17 March. <a href="https://www.gov.uk/government/publications/the-impact-of-adding-school-closure-to-other-social-distance-measures-17-march-2020"><strong>Impact of adding school closure to other social distance measures.</strong></a></li>
<li>1 April. <a href="https://www.gov.uk/government/publications/the-impact-of-relaxing-lockdown-measures-2-1-april-2020"><strong>Impact of relaxing lockdown measures.</strong></a></li>
<li>3 April. <a href="https://www.gov.uk/government/publications/lshtm-modelling-scenarios-for-relaxation-of-lockdown-in-england-3-may-2020"><strong>Modelling scenarios for relaxation of lockdown in England.</strong></a></li>
</ul>
<p><strong>Suggested or ongoing development:</strong> There is work in progress with {epidemics} to allow a more flexible and editable <a href="https://github.com/epiverse-trace/epidemics/issues/254">{odin} back end</a>, in case different features are required in future. This will have the advantage of combining the plug-and-play ability to rapidly define age-specific contact structure, demography, parameter uncertainty and overlapping interventions using {epidemics} syntax with a fast and adaptable {odin} simulation model.</p>
</section>
<section id="detailed-contact-tracing-analysis" class="level3">
<h3 class="anchored" data-anchor-id="detailed-contact-tracing-analysis">Detailed contact tracing analysis</h3>
<p><a href="https://github.com/adamkucharski/2020-cov-tracing">Code</a> ✅ | <a href="https://github.com/rs-delve/tti-explorer">Package</a> ✅ | Days (rough), Weeks (robust)</p>
<p>This collection of individual-level testing and contact tracing modelling reports, which made use of the BBC social mixing data, was later published as a summary paper, <a href="https://www.thelancet.com/article/S1473-3099(20)30457-6/fulltext">Kucharski et al, Lancet Inf Dis, 2020</a>. The original model was in R, and was later converted into a <a href="https://github.com/rs-delve/tti-explorer">Python library</a> as part of the Royal Society Delve initiative, feeding in to <a href="https://rs-delve.github.io/reports/2020/05/27/test-trace-isolate.html">follow up analysis</a>. This was a rapidly developed bespoke model with multiple types of contact (e.g.&nbsp;home, school, work, other) and an approximated transmission dynamic rather than full simulation (i.e.&nbsp;if 50% of infectious contacts are traced half-way through their likely infectious period, it would cut <img src="https://latex.codecogs.com/png.latex?R"> by 25%).</p>
<p><strong>Suggested or ongoing development:</strong> For a future epidemic, it may be more useful to merge these concepts into two types of tool, building on succesful outputs for COVID: 1) a <a href="https://royalsocietypublishing.org/doi/10.1098/rstb.2020.0276">‘ready reckoners’</a> method that shows very intuitively how contact changes influence overall <img src="https://latex.codecogs.com/png.latex?R"> (this could make use of <img src="https://latex.codecogs.com/png.latex?R"> functionality in{finalsize}), and 2) a more comprehensive model of isolation and quarantine, like the prospective <a href="https://github.com/epiverse-trace/epinetwork/">{epinetwork}</a> package.</p>
<p>Some further reflections on specific analysis reports for SPI-M-O are below:</p>
<ul>
<li>16 April. <a href="https://www.gov.uk/government/publications/using-bbc-pandemic-data-to-model-the-impact-of-isolation-testing-contact-tracing-and-physical-distancing-on-reducing-transmission-of-covid-19-in-dif"><strong>Using BBC Pandemic data to model the impact of isolation, testing, contact tracing and physical distancing on reducing transmission of COVID-19 in different settings.</strong></a></li>
<li>20 April. <a href="https://www.gov.uk/government/publications/effectiveness-of-isolation-testing-contact-tracing-and-physical-distancing-on-reducing-transmission-of-covid-19-in-different-settings-draft-for-spi"><strong>Effectiveness of isolation, testing, contact tracing and physical distancing on reducing transmission of COVID-19 in different settings.</strong></a></li>
<li>21 April. <a href="https://www.gov.uk/government/publications/lshtm-the-possible-impact-of-mask-wearing-outside-the-home-on-the-transmission-of-covid-19-21-april-2020"><strong>The possible impact of mask wearing outside the home on the transmission of COVID-19.</strong></a> <strong>Suggested or ongoing development:</strong> This blanket measure could be explored using {ringbp} or {epichains} in their current form, e.g.&nbsp;this <a href="https://epiverse-trace.github.io/epichains/articles/interventions.html">interventions vignette</a>.</li>
<li>26 April. <a href="https://www.gov.uk/government/publications/estimated-impact-of-delay-from-isolation-of-symptomatic-case-to-test-result-and-quarantine-of-contacts-26-april-2020"><strong>Estimated impact of delay from isolation of symptomatic case to test result and quarantine of contacts.</strong></a></li>
<li>30 April. <a href="https://www.gov.uk/government/publications/estimated-impact-of-testing-quarantined-contacts-at-different-points-in-time-30-april-2020"><strong>Estimated impact of testing quarantined contacts at different points in time.</strong></a> <strong>Suggested or ongoing development:</strong> Certain key aspects of this could be explored using {ringbp}, or {epinetwork}, particularly in terms of proportion of population quarantined at a given point in time.</li>
</ul>
</section>
<section id="june-2020-analysis-of-superspreading" class="level3">
<h3 class="anchored" data-anchor-id="june-2020-analysis-of-superspreading">3 June 2020: Analysis of superspreading</h3>
<p>Code ❌ | <a href="https://epiverse-trace.github.io/superspreading/">Package</a> ✅ | Minutes (robust)</p>
<p>This paper for SPI-M-O, <a href="https://www.gov.uk/government/publications/analysis-of-sars-cov-2-transmission-clusters-and-superspreading-events-3-june-2020"><strong>Analysis of SARS-CoV-2 transmission clusters and superspreading events</strong></a>, provided different metrics to summarise the superspreading features of SARS-CoV-2. These functions are now in the {superspreading} package, with <a href="https://epiverse-trace.github.io/tutorials-middle/superspreading-estimate.html">examples</a> in the Epiverse-TRACE training.</p>
</section>
<section id="june-2020-analysis-of-forwards-and-backwards-tracing" class="level3">
<h3 class="anchored" data-anchor-id="june-2020-analysis-of-forwards-and-backwards-tracing">10 June 2020: Analysis of forwards and backwards tracing</h3>
<p><a href="https://github.com/akira-endo/COVID19_backwardtracing">Code</a> ✅ | Package ❌ | Hours (rough), Days (robust)</p>
<p>This paper for SPI-M-O, <strong>Branching process modelling of effectiveness of forward and backward tracing for SARS-CoV-2 control</strong> was later published as <a href="https://wellcomeopenresearch.org/articles/5-239">Endo et al, Wellcome Open Res, 2020</a>.</p>
<p><strong>Suggested or ongoing development:</strong> Although the underlying model isn’t in a package, the analysis is featured in the <a href="https://epiverse-trace.github.io/tutorials-middle/superspreading-estimate.html#controlling-superspreading-with-contact-tracing">Epiverse-TRACE training</a>. The core insight is also a relatively simple equation, i.e.&nbsp;that backward tracing would be expected to identify <img src="https://latex.codecogs.com/png.latex?R(1+1/k)"> cases, where <img src="https://latex.codecogs.com/png.latex?k"> is the dispersion parameter, so should add this to relevant training and/or vignettes.</p>
</section>
<section id="oct-2020-testing-and-contact-tracing-in-a-real-world-network" class="level3">
<h3 class="anchored" data-anchor-id="oct-2020-testing-and-contact-tracing-in-a-real-world-network">14 Oct 2020: Testing and contact tracing in a real-world network</h3>
<p><a href="https://github.com/biouea/covidhm">Code</a> ✅ | <a href="https://github.com/biouea/covidhm">Package</a> ✅ | Days (rough), Weeks (robust)</p>
<p>This paper for SPI-M-O, <strong>Modelling effectiveness of TTI and physical distancing in controlling SARS-CoV-2 in high and low prevalence communities, based on UK contact network data</strong> built on the <a href="https://www.nature.com/articles/s41591-020-1036-8">Firth et al, Nature Med, 2020</a>. This used BBC contact network data from Haslemere to investigate interventions in clustered networks, leading to a package {covidhm} that built on {ringbp}. This package was subsequently also used for analysis of outbreak dynamics on <a href="https://www.nature.com/articles/s41467-022-29522-y">Singapore test cruises</a>.</p>
<p><strong>Suggested or ongoing development:</strong> Once {ringbp} is stable, there is scope to expand to include the above functionality with the placeholder {epinetwork} package, which is a fork of the more specific {covidhm} implementationn.</p>
</section>
<section id="oct-dec-2020-strategies-for-pcr-and-lateral-flow-testing" class="level3">
<h3 class="anchored" data-anchor-id="oct-dec-2020-strategies-for-pcr-and-lateral-flow-testing">Oct-Dec 2020: Strategies for PCR and lateral flow testing</h3>
<p>The below papers for SPI-M-O used data on PCR and lateral flow performance to investigate different testing strategies.</p>
<p>21 Oct.&nbsp;<strong>Modelling frequent testing using PCR and lateral flow based on detection probabilities estimated from regular testing of health care workers</strong>. This paper used testing data from UCLH to infer the probability of test positivity post infection. It would later be published as <a href="https://bmcmedicine.biomedcentral.com/articles/10.1186/s12916-021-01982-x">Hellewell et al, BMC Medicine, 2021</a>.</p>
<p><a href="https://github.com/cmmid/pcr-profile">Code</a> ✅ | Package ⏳ | Days (rough), Weeks (robust)</p>
<p><strong>Suggested or ongoing development:</strong> This analysis focused on test positivity as an outcome, tailored to data available from the UCLH study (PCR + paired serology) but a more detailed framework could use Ct data as well, such as the <a href="https://github.com/thimotei/legacy_ct_modelling">codebase</a> for LEGACY Ct modelling and <a href="https://github.com/seroanalytics/epikinetics">{epikinetics}</a> package currently in progress for antibody kinetics (which could also be adapted to other biological timescales.</p>
<p>2 Dec.&nbsp;<a href="https://www.gov.uk/government/publications/lshtm-estimating-detection-of-infection-among-household-gathering-attendees-based-on-one-off-pre-gathering-lateral-flow-tests-2-december-2020"><strong>Estimating detection of infection among household gathering attendees based on one-off pre-gathering lateral flow tests</strong></a>. This paper used posteriors from the above analysis to explore different testing scenarios for family gatherings.</p>
<p>Code ❌ | Package ❌ | Minutes (rough), Days (robust)</p>
<p><strong>Suggested or ongoing development:</strong> The underlying equations in this analysis are quite simple (i.e.&nbsp;no more than a few lines of code), but could form a useful helper package. James Hay also built a somewhat related <a href="https://jamesahay.shinyapps.io/screening_accuracy/">Shiny app</a> (code <a href="https://github.com/jameshay218/screening_accuracy">here</a>) linked to an <a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC8318052/">accompanying paper about intution behind testing performance</a>.</p>
</section>
<section id="mar-2021-potential-for-herd-immunity-against-the-alpha-variant" class="level3">
<h3 class="anchored" data-anchor-id="mar-2021-potential-for-herd-immunity-against-the-alpha-variant">9 Mar 2021: Potential for herd immunity against the Alpha variant</h3>
<p><a href="https://github.com/adamkucharski/hit-analysis">Code</a> ✅ | Package ❌ | Minutes (rough), Hours (robust)</p>
<p>This paper for SPI-M-O looked at the potential for vaccination-induced herd immunity against SARS-CoV-2, based on <img src="https://latex.codecogs.com/png.latex?R_0"> and vaccine effectiveness. It would be later published as <a href="https://www.eurosurveillance.org/content/10.2807/1560-7917.ES.2021.26.20.2100428">Hodgson et al, Eurosurveillance, 2021</a>.</p>
<p><strong>Suggested or ongoing development:</strong> The basic calculation was relatively simple (<img src="https://latex.codecogs.com/png.latex?1-1/R_0">, which holds regardless of age mixing assumptions, as long as the correct <img src="https://latex.codecogs.com/png.latex?R_0"> has been derived for the population of interest). However, {finalsize} has the functionality required to estimate this <img src="https://latex.codecogs.com/png.latex?R_0"> (or <img src="https://latex.codecogs.com/png.latex?R">) for a given population and immunity structure (e.g.&nbsp;from prior infection).</p>
</section>
<section id="may-jun-2021-transmission-dynamics-of-the-delta-variant" class="level3">
<h3 class="anchored" data-anchor-id="may-jun-2021-transmission-dynamics-of-the-delta-variant">May-Jun 2021: Transmission dynamics of the Delta variant</h3>
<p><a href="https://github.com/adamkucharski/covid-import-model">Code</a> ✅ | Package ❌ | Days (rough), Weeks (robust)</p>
<p>This collection of reports for SPI-M-O/SAGE analysed the transmission dynamics of the B.1.617.2 (Delta) variant in the UK, untangling imported infections from community transmission. The real-time model was coded in R, with fitting via MLE and then MCMC (as parameter space increased), with a <a href="https://github.com/seabbs/covid-import-model/blob/main/stan/model.stan">stan prototype of the model</a> also developed by Sam Abbott.</p>
<ul>
<li>12 May. <a href="https://www.gov.uk/government/publications/cmmid-covid-19-working-group-modelling-importations-and-local-transmission-of-b16172-in-the-uk-12-may-2021"><strong>Modelling importations and local transmission of B.1.617.2 in the UK.</strong></a></li>
<li>18 May. <strong>Dynamics of B.1.617.2 in the UK from importations, traveller-linked and non-traveller-linked transmission, 18 May 2021.</strong></li>
<li>25 May. <a href="https://www.gov.uk/government/publications/lshtm-dynamics-of-delta-b16172-in-the-uk-from-importations-traveller-linked-and-non-traveller-linked-transmission-25-may-2021"><strong>Dynamics of B.1.617.2 in the UK from importations, traveller-linked and non-traveller linked transmission, 25 May 2021.</strong></a></li>
<li>01 Jun.&nbsp;<a href="https://www.gov.uk/government/publications/lshtm-dynamics-of-delta-b16172-in-england-nhs-regions-from-importations-traveller-linked-and-non-traveller-linked-transmission-1-june-2021"><strong>Dynamics of B.1.617.2 in England NHS regions from importations, traveller-linked and non-traveller-linked transmission.</strong></a></li>
<li>08 Jun.&nbsp;<strong>Dynamics of Delta variant in England NHS regions from importations, traveller-linked and non-traveller-linked transmission.</strong></li>
</ul>
<p><strong>Suggested or ongoing development:</strong> The current code base is tailored to COVID-19, but the broader issue of distinguishing external importations (which may be known to some extent, e.g.&nbsp;based on timing of travel ban) from domestic human-to-human transmission also comes up for infections like avian influenza and mpox. If cases can be disaggregated into imported or domestic origin, then {EpiEstim} can calculate domestic transmission based on these data (<a href="https://doi.org/10.1016/j.epidem.2019.100356">Thompson et al, Epidemics, 2019</a>). However, <img src="https://latex.codecogs.com/png.latex?R_t"> estimation packages based on renewal processes, like {EpiEstim} and {EpiNow2} are not structured to infer such dynamics if the exact number of importations are unknown, so in future it may be useful to have a framework that builds on the <a href="https://elifesciences.org/articles/78089">Golding et al two component approach</a> developed for the Australian COVID response (accompanying <a href="https://github.com/goldingn/covid19_australia_interventions">code here</a>).</p>
</section>
<section id="jun-2021-analysis-of-social-contact-data-during-reopening" class="level3">
<h3 class="anchored" data-anchor-id="jun-2021-analysis-of-social-contact-data-during-reopening">1 Jun 2021: Analysis of social contact data during reopening</h3>
<p><a href="https://github.com/bquilty25/superspreading_testing">Code</a> ✅ | Package ⏳ | Hours (rough), Weeks (robust)</p>
<p>Two papers for SPI-M-O/SAGE looked at social contact dynamics during reopening:</p>
<ul>
<li><a href="https://www.gov.uk/government/publications/cmmid-social-contacts-in-the-uk-from-the-comix-social-contact-survey"><strong>Analysis of individuals with a high number of contacts in the CoMix study</strong>.</a></li>
<li><a href="https://www.gov.uk/government/publications/lshtm-and-kcl-reconstructing-the-secondary-case-distribution-of-sars-cov-2-from-heterogeneity-in-viral-load-trajectories-and-social-contacts-1-june"><strong>Reconstructing the secondary case distribution of SARS-CoV-2 from heterogeneity in viral load trajectories and social contacts</strong>.</a></li>
</ul>
<p>CoMix data are now available as part of the {socialmixr} package, with code for the secondary case distribution released with the <a href="https://www.medrxiv.org/content/10.1101/2024.08.15.24311977v2">Chapman et al pre-print</a>.</p>
<p><strong>Suggested or ongoing development:</strong> The methods used for ‘first principles’ reconstruction of <img src="https://latex.codecogs.com/png.latex?R_t"> could be included in a future social mixing analysis package, but would benefit from a larger database of viral load trajectories for different pathogens (currently available for SARS-CoV-2, but in theory estimatable for a range of acute infectious diseases).</p>
</section>
</section>
<section id="concluding-thoughts" class="level2">
<h2 class="anchored" data-anchor-id="concluding-thoughts">Concluding thoughts</h2>
<p>Code was generally made available alongside public reports by LSHTM during COVID-19, except for very simple calculations. Several key functions are now available in R packages developed since the emergence of COVID-19, turning tasks that would have taken days into tasks that require only hours, but there are still some remaining bottlenecks to ensure that the methods would be applicable easily to H5N1, meaning some customised tasks for pandemic influenza would take hours when - with some further refinement - they could take minutes.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{kucharski2024,
  author = {Kucharski, Adam},
  title = {How Well Prepared Are We to Rapidly Analyse a New Influenza
    Pandemic? {A} Brief Perspective on Analysis Conducted for {UK}
    Government Advisory Groups During {COVID-19}},
  date = {2024-12-23},
  url = {https://epiverse-trace.github.io/posts/covid-analysis/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-kucharski2024" class="csl-entry quarto-appendix-citeas">
Kucharski, Adam. 2024. <span>“How Well Prepared Are We to Rapidly
Analyse a New Influenza Pandemic? A Brief Perspective on Analysis
Conducted for UK Government Advisory Groups During COVID-19.”</span>
December 23. <a href="https://epiverse-trace.github.io/posts/covid-analysis/">https://epiverse-trace.github.io/posts/covid-analysis/</a>.
</div></div></section></div> ]]></description>
  <category>COVID</category>
  <category>R</category>
  <category>real-time analysis</category>
  <category>pandemic preparedness</category>
  <category>H5N1</category>
  <guid>https://epiverse-trace.github.io/posts/covid-analysis/</guid>
  <pubDate>Mon, 23 Dec 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>epiparameterDB v0.1.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/epiparameterDB_v0.1.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new epiparameterDB version v0.1.0. Here is an automatically generated summary of the changes in this version.</p>
<p>This is the first minor release of the <code>{epiparameterDB}</code> R package. It contains the epidemiological parameter database originally part of the <code>{epiparameter}</code> R package.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li>The first release contains the parameter database (<code>parameters.json</code>) from the <code>{epiparameter}</code> package v0.3.0.</li>
<li>Functionality to read the JSON file (<code>parameters.json</code>), render the database as a vignette (<code>database.Rmd</code>), and validate the JSON database with a data dictionary (<code>data_dictionary.json</code>) using a GitHub actions workflow (<code>validate-json.yaml</code>) have been copied from the original <code>{epiparameter}</code> implementation.</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li>None</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/dependabot%5Bbot%5D">@dependabot[bot]</a> <a href="https://github.com/joshwlambert">@joshwlambert</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2024,
  author = {Epiverse-TRACE development team, The},
  title = {epiparameterDB V0.1.0},
  date = {2024-12-18},
  url = {https://epiverse-trace.github.io/posts/epiparameterDB_v0.1.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2024" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2024. <span>“epiparameterDB
V0.1.0.”</span> December 18. <a href="https://epiverse-trace.github.io/posts/epiparameterDB_v0.1.0/">https://epiverse-trace.github.io/posts/epiparameterDB_v0.1.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/epiparameterDB_v0.1.0/</guid>
  <pubDate>Wed, 18 Dec 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>How we work: My first full package review</title>
  <dc:creator>Chris Hartgerink</dc:creator>
  <link>https://epiverse-trace.github.io/posts/20241209full-package-reviews/</link>
  <description><![CDATA[ 





<p>At Epiverse-TRACE, we continuously develop packages, which risks making us (hyper)focused on the everyday changes. Feature here, bug fix there. We can call this “development by Pull Request,” where we introduce changes in relatively small batches, compared to general development without compartmentalization. Of course, it is a developer’s responsibility to also take into consideration the entire codebase. However, to sometimes enforce taking that step back, <a href="https://epiverse-trace.github.io/blueprints/code-review.html#full-package-review">our contribution blueprints outline that we do full package reviews</a>. In this blog post, I highlight what a full package review is, how it is set up, and some of my experiences with this process.</p>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Tip
</div>
</div>
<div class="callout-body-container callout-body">
<p>In the “How we work” series, Epiverse-TRACE contributors share how they work. This does not necessarily reflect a standardized way of working, and helps highlight how diverse coding practices can be.</p>
</div>
</div>
<section id="what-is-a-full-package-review" class="level2">
<h2 class="anchored" data-anchor-id="what-is-a-full-package-review">What is a full package review?</h2>
<p>You may not be surprised to hear that a full package review covers every part of a package ever written. This means the entire current codebase is in scope, from day one of development. It does not necessitate reviewing the entire commit history per se, focussing on the package as it stands at that time. As a maintainer that can be scary, because it can include code you did not write yourself, and may not know how to justify (at least that is what happens for me).</p>
<p>Our regular code reviews take place on GitHub, using Pull Requests. For full package reviews, we also use Pull Requests in Epiverse-TRACE. This means that all the features from GitHub are available to make suggestions, approve the code, or leave precise comments at a specific line in the code.</p>
<p>What is different, is that all the files are considered new, and part of the review. This includes the files already present in our <a href="https://github.com/epiverse-trace/packagetemplate">package template</a>, but also all test files, documentation, and more. A full package review is usually triggered by an upcoming release, either on GitHub or CRAN.</p>
</section>
<section id="how-do-i-set-one-up" class="level2">
<h2 class="anchored" data-anchor-id="how-do-i-set-one-up">How do I set one up?</h2>
<p>Git and GitHub do not support full package reviews by default. This is because pull requests are usually merged into an existing branch, which already contains existing code. For a full package review, what we want is to merge onto an empty branch.</p>
<p>In order to create a branch that has no code at all, run the following shell command from within your git directory:</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode sh code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> branch empty <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">`</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> rev-list <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--all</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">|</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tail</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-1</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">`</span></span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> push origin empty</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> branch review</span>
<span id="cb1-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> push origin review</span></code></pre></div></div>
<p>These commands are also noted in the blueprints, but I simplified them so that you do not need to copy paste the hash of the first commit. Also, you can use this command for any Git repository and open up the pull request through GitHub (or Gitlab, Forgejo). This means that doing a full package review can be done anywhere, anytime.</p>
</section>
<section id="the-experience-of-a-full-package-review" class="level2">
<h2 class="anchored" data-anchor-id="the-experience-of-a-full-package-review">The experience of a full package review</h2>
<p><a href="../../posts/chjh-intro-blog/index.html">Since joining Epiverse-TRACE</a>, I participated in many full package reviews, but did not until quite recently initiate my own. For the new package <strong>safeframe</strong>, <a href="https://github.com/epiverse-trace/safeframe/pull/40">I recently requested a full package review</a>. This highlighted two quirks I did not realize before.</p>
<p>First, it feels like doing something that can easily go wrong. I have been using Git for over a decade<sup>1</sup>, but this was completely new to me. Given that git operations can sometimes cause issues, I was hesitant to just run the shell commands. Maybe having a demo video showing it works, will help contributors gain confidence in doing this.</p>
<p>Second, reviewer suggestions are great, but getting them on a full package review involves manual work to include them. I try to leave actionable suggestions directly in the code when I review, so they are easy to accept and integrate into the codebase. With full package reviews, receiving suggestions became slightly annoying. Not because of the reviewer, but because the suggestions have to be manually recreated in a separate branch that will actually be merged. It would be great if we had a way to keep the ease of integrating reviewer suggestions in full package reviews.</p>
<hr>
<p>Overall, full package reviews are a helpful way to take a step back and take in the big picture. It is a great moment to get feedback from Epiverse-TRACE developers and discuss how the package fits in to the ecosystem. It also comes with some quirks, as I outlined, which I would like to find ways to address.</p>
<p>I would be interested to hear other developer’s experiences with full package reviews in the comments!</p>


</section>


<div id="quarto-appendix" class="default"><section id="footnotes" class="footnotes footnotes-end-of-document"><h2 class="anchored quarto-appendix-heading">Footnotes</h2>

<ol>
<li id="fn1"><p>My GitHub account is from 2011, but at that time I did not understand what GitHub was or did.↩︎</p></li>
</ol>
</section><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{hartgerink2024,
  author = {Hartgerink, Chris},
  title = {How We Work: {My} First Full Package Review},
  date = {2024-12-09},
  url = {https://epiverse-trace.github.io/posts/20241209full-package-reviews/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hartgerink2024" class="csl-entry quarto-appendix-citeas">
Hartgerink, Chris. 2024. <span>“How We Work: My First Full Package
Review.”</span> December 9. <a href="https://epiverse-trace.github.io/posts/20241209full-package-reviews/">https://epiverse-trace.github.io/posts/20241209full-package-reviews/</a>.
</div></div></section></div> ]]></description>
  <category>blueprints</category>
  <category>How we work</category>
  <guid>https://epiverse-trace.github.io/posts/20241209full-package-reviews/</guid>
  <pubDate>Mon, 09 Dec 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>vaccineff v1.0.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/vaccineff_v1.0.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new <a href="https://epiverse-trace.github.io/vaccineff/">vaccineff</a> version v1.0.0. The package offers tools for estimating vaccine effectiveness (VE) and related metrics, with features such as:</p>
<ul>
<li>Estimation in a cohort study design via the Cox model for Proportional Hazards<br>
</li>
<li>Controlling for confounders through an iterative matching algorithm<br>
</li>
<li>A detailed vignette with illustrative examples</li>
</ul>
<p>Two main functions compose <code>{vaccineff 1.0.0}</code>:</p>
<ol type="1">
<li><p><code>make_vaccineff_data()</code>: Constructs the <code>vaccineff_data</code> class, managing key features for preparing, visualizing, and organizing cohort data.</p></li>
<li><p><code>estimate_vaccineff()</code>: Constructs the <code>vaccineff</code> class, enabling estimation of VE and assessment of results and model performance.</p></li>
</ol>
<p>Both classes support <code>plot()</code> and <code>summary()</code> methods, providing visualizations and detailed reports.</p>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking Changes</h2>
<p><code>{vaccineff 1.0.0}</code> refactors the package’s internal structure for better maintainability.</p>
<ul>
<li><p><strong><code>estimate_vaccineff()</code></strong> replaces <code>effectiveness()</code>.</p>
<ul>
<li>It returns an object of class <code>vaccineff</code>.</li>
<li>The <code>at</code> parameter must always be provided for accurate results.</li>
</ul></li>
<li><p><strong><code>plot.vaccineff_data()</code></strong> replaces <code>plot_coverage()</code>.</p></li>
<li><p><strong><code>cohortdata</code></strong> has been simplified and reduced to improve examples and reduce computation time.</p></li>
</ul>
</section>
<section id="quick-start" class="level2">
<h2 class="anchored" data-anchor-id="quick-start">Quick start</h2>
<p>To start with <code>{vaccineff}</code> 1.0.0, run the following example. This example estimates VE using the package’s example dataset, adjusted for confounders (age and sex) via the iterative matching strategy.</p>
<p>The <code>summary()</code> method for the <code>vaccineff_data</code> object provides details on cohort balance and composition before and after applying the matching strategy, as well as general cohort features.</p>
<p>When called on the <code>vaccineff</code> object (<code>ve</code>), the <code>summary()</code> method returns the estimation summary, including results from the Schoenfeld test for proportional hazards.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(vaccineff)</span>
<span id="cb1-2"></span>
<span id="cb1-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Create `vaccineff_data`</span></span>
<span id="cb1-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">data</span>(cohortdata)</span>
<span id="cb1-5">vaccineff_data <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make_vaccineff_data</span>(</span>
<span id="cb1-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data_set =</span> cohortdata,</span>
<span id="cb1-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">outcome_date_col =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"death_date"</span>,</span>
<span id="cb1-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">censoring_date_col =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"death_other_causes"</span>,</span>
<span id="cb1-9">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">vacc_date_col =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"vaccine_date_2"</span>,</span>
<span id="cb1-10">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">vaccinated_status =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"v"</span>,</span>
<span id="cb1-11">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">unvaccinated_status =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"u"</span>,</span>
<span id="cb1-12">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">immunization_delay =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,</span>
<span id="cb1-13">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">end_cohort =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as.Date</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2021-12-31"</span>),</span>
<span id="cb1-14">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">match =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span id="cb1-15">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">exact =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"sex"</span>,</span>
<span id="cb1-16">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">nearest =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">age =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)</span>
<span id="cb1-17">)</span>
<span id="cb1-18"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summary</span>(vaccineff_data)</span></code></pre></div></div>
<div class="cell-output cell-output-stdout">
<pre><code>Cohort start:  2021-03-26
Cohort end:  2021-12-31
The start date of the cohort was defined as the mininimum immunization date. 
65 registers were removed with outcomes before the start date.

Nearest neighbors matching iteratively performed.
Number of iterations:  4
Balance all:
              u         v         smd
age   63.917069 62.997438 -0.08593156
sex_F  0.520277  0.573474  0.10701746
sex_M  0.479723  0.426526 -0.10701746

Balance matched:
               u          v         smd
age   63.9014396 63.7280362 -0.01587567
sex_F  0.5206718  0.5206718  0.00000000
sex_M  0.4793282  0.4793282  0.00000000

Summary vaccination:
              u     v
All       10973 19905
Matched   10836 10836
Unmatched   137  9069

// tags: outcome_date_col:death_date, censoring_date_col:death_other_causes, vacc_date_col:vaccine_date_2, immunization_date_col:immunization_date, vacc_status_col:vaccine_status </code></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Estimate VE</span></span>
<span id="cb3-2">ve <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">estimate_vaccineff</span>(vaccineff_data, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">at =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">180</span>)</span>
<span id="cb3-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summary</span>(ve)</span></code></pre></div></div>
<div class="cell-output cell-output-stdout">
<pre><code>Vaccine Effectiveness at 180 days computed as VE = 1 - HR:
     VE lower.95 upper.95
 0.7254   0.5437   0.8347

Schoenfeld test for Proportional Hazards assumption:
p-value = 0.1507</code></pre>
</div>
</div>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/davidsantiagoquevedo">@davidsantiagoquevedo</a> <a href="https://github.com/ErikaCantor">@ErikaCantor</a> <a href="https://github.com/fsabrilb">@fsabrilb</a> <a href="https://github.com/GeraldineGomez">@GeraldineGomez</a> <a href="https://github.com/jpavlich">@jpavlich</a> <a href="https://github.com/ManuelVelarde2212">@ManuelVelarde2212</a> <a href="https://github.com/pratikunterwegs">@pratikunterwegs</a> <a href="https://github.com/zmcucunuba">@zmcucunuba</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2024,
  author = {Epiverse-TRACE development team, The},
  title = {Vaccineff V1.0.0},
  date = {2024-12-02},
  url = {https://epiverse-trace.github.io/posts/vaccineff_v1.0.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2024" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2024. <span>“Vaccineff
V1.0.0.”</span> December 2. <a href="https://epiverse-trace.github.io/posts/vaccineff_v1.0.0/">https://epiverse-trace.github.io/posts/vaccineff_v1.0.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/vaccineff_v1.0.0/</guid>
  <pubDate>Mon, 02 Dec 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>epiparameter v0.3.0</title>
  <dc:creator>The Epiverse-TRACE development team</dc:creator>
  <link>https://epiverse-trace.github.io/posts/epiparameter_v0.3.0/</link>
  <description><![CDATA[ 





<p>We are very excited to announce the release of a new epiparameter version v0.3.0. Here is an automatically generated summary of the changes in this version.</p>
<p>The third minor release of the {epiparameter} R package contains a range of updates and improvements to the package. The principal aim of this release is to simplify, clarify and enhance the classes and class methods when working with epidemiological parameters in R.</p>
<p>The are a large number of <strong><em>breaking changes</em></strong> in this release, primarily functions and function arguments being renamed or restructured, see the <em>Breaking changes</em> section for an overview.</p>
<section id="new-features" class="level2">
<h2 class="anchored" data-anchor-id="new-features">New features</h2>
<ul>
<li>The library of epidemiological parameters has been updated to include 3 new Chikungunya parameter entries. The Mpox parameters previously missing from the Guzzetta et al.&nbsp;entry have been added (#346 &amp; #374).</li>
<li>A <code>c()</code> method has been added for <code>&lt;epiparameter&gt;</code> and <code>&lt;multi_epiparameter&gt;</code> objects (#368).</li>
<li>An <code>aggregate()</code> method has been added for <code>&lt;multi_epiparameter&gt;</code> to enable consensus distributions to be built utilising the mixture distribution class from <a href="https://CRAN.R-project.org/package=distributional">{distributional}</a> (#388).</li>
<li>Infrastructure has been added to the package to allow translations of messages/warnings/errors printed to the console. (<span class="citation" data-cites="Bisaloo">@Bisaloo</span>, #367).</li>
<li><code>convert_summary_stats_to_params()</code> can now convert from median and dispersion for a lognormal distribution (#378).</li>
<li>The <code>data_dictionary.json</code> has been enhanced to improve validation of the library of epidemiological parameters (<code>parameters.json</code>) (#379).</li>
<li>An interactive network showing all of the <code>&lt;epiparameter&gt;</code> S3 methods has been added to the <code>design_principles.Rmd</code> vignette (#383).</li>
<li>The <code>data_from_epireview.Rmd</code> article has been improved and updated with new changes from {epireview} (<span class="citation" data-cites="CarmenTamayo">@CarmenTamayo</span> &amp; <span class="citation" data-cites="cm401">@cm401</span> &amp; <span class="citation" data-cites="kellymccain28">@kellymccain28</span>, #305 &amp; #373).</li>
<li>Parameter units have been added to every entry in the {epiparameter} library (<code>parameters.json</code>) and to the <code>$metadata</code> element in <code>&lt;epiparameter&gt;</code> objects. The <code>create_metadata()</code> function now has a <code>units</code> argument to construct metadata lists (#391).</li>
<li>Improved <code>database.Rmd</code> vignette by adding a short citation to the reference column (<span class="citation" data-cites="jamesmbaazam">@jamesmbaazam</span>, #348).</li>
<li>The <code>family()</code> method for <code>&lt;epiparameter&gt;</code> has been improved to allow access to distribution names for transformed (e.g.&nbsp;<code>mixture</code> and <code>truncated</code> distributions) and untransformed (e.g.&nbsp;<code>gamma</code> and <code>lognormal</code>) distributions with a new argument <code>base_dist</code> and a new internal function <code>.distributional_family()</code> (#398).</li>
<li><code>as_epiparameter()</code> can now work with the SARS parameters from {epireview} (#407).</li>
</ul>
</section>
<section id="breaking-changes" class="level2">
<h2 class="anchored" data-anchor-id="breaking-changes">Breaking changes</h2>
<ul>
<li>The <code>&lt;epidist&gt;</code> class has been renamed <code>&lt;epiparameter&gt;</code> to avoid confusion with the similar R package <a href="https://github.com/epinowcast/epidist">{epidist}</a> (#360).</li>
<li>Many functions that used <code>epidist</code> in their names have been renamed to use <code>epiparameter</code> due to the renaming of the class (#360).</li>
<li>The function signatures of <code>epiparameter()</code> and <code>new_epiparameter()</code> functions (previously <code>epidist()</code> and <code>new_epidist()</code>) have been updated to collapse the <code>prob_dist</code>, <code>prob_dist_params</code>, <code>discretise</code> and <code>truncation</code> arguments into <code>prob_distribution</code>, which accepts the output of <code>create_prob_distribution()</code> (#381).</li>
<li>The <code>epi_dist</code> argument has been renamed <code>epi_name</code>. This is to clarify that {epiparameter} can work with epidemiological parameters that take a variety of forms (e.g.&nbsp;point estimates, ranges, probability distributions, etc.) (#390).</li>
<li>The <code>&lt;vb_epidist&gt;</code> class and it’s methods have been removed from the package. It was not being used and was increasing the complexity and maintenance load of the package (#359).</li>
<li><code>create_prob_dist()</code> has been renamed to <code>create_prob_distribution()</code> (#381).</li>
<li><code>validate_epiparameter()</code> (previously <code>validate_epidist()</code>) has been renamed <code>assert_epiparameter()</code>, and <code>test_epiparameter()</code> has been added, with the aim to harmonise design with <a href="https://github.com/socialcontactdata/contactmatrix">{contactmatrix}</a> and the messages and errors have been improved (#366 &amp; #402).</li>
<li>The minimum version of R required by the package is now 4.1.0 due to the use of the base R pipe (<code>|&gt;</code>) in dependencies, and the R-CMD-check workflow on GitHub actions now explicitly runs on the minimum version of R stated in the <code>DESCRIPTION</code> (#384 &amp; #405).</li>
</ul>
</section>
<section id="bug-fixes" class="level2">
<h2 class="anchored" data-anchor-id="bug-fixes">Bug fixes</h2>
<ul>
<li>Epidemiological parameter entries in the library stored with lognormal distributions, parameterised as median and dispersion are now converted to meanlog and sdlog correctly when creating an <code>&lt;epiparameter&gt;</code> (when <code>auto_calc_params = TRUE</code>) (#381).</li>
</ul>
</section>
<section id="deprecated-and-defunct" class="level2">
<h2 class="anchored" data-anchor-id="deprecated-and-defunct">Deprecated and defunct</h2>
<ul>
<li><code>epidist_db()</code> has been deprecated. It is replaced by <code>epiparameter_db()</code> (#360 &amp; #399).</li>
</ul>
</section>
<section id="acknowledgements" class="level2">
<h2 class="anchored" data-anchor-id="acknowledgements">Acknowledgements</h2>
<p><a href="https://github.com/Bisaloo">@Bisaloo</a> <a href="https://github.com/CarmenTamayo">@CarmenTamayo</a> <a href="https://github.com/adamkucharski">@adamkucharski</a> <a href="https://github.com/avallecam">@avallecam</a> <a href="https://github.com/chartgerink">@chartgerink</a> <a href="https://github.com/jamesmbaazam">@jamesmbaazam</a> <a href="https://github.com/joshwlambert">@joshwlambert</a></p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{epiverse-trace_development_team2024,
  author = {Epiverse-TRACE development team, The},
  title = {Epiparameter V0.3.0},
  date = {2024-11-21},
  url = {https://epiverse-trace.github.io/posts/epiparameter_v0.3.0/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-epiverse-trace_development_team2024" class="csl-entry quarto-appendix-citeas">
Epiverse-TRACE development team, The. 2024. <span>“Epiparameter
V0.3.0.”</span> November 21. <a href="https://epiverse-trace.github.io/posts/epiparameter_v0.3.0/">https://epiverse-trace.github.io/posts/epiparameter_v0.3.0/</a>.
</div></div></section></div> ]]></description>
  <category>new-release</category>
  <guid>https://epiverse-trace.github.io/posts/epiparameter_v0.3.0/</guid>
  <pubDate>Thu, 21 Nov 2024 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Using LLM agents to review tutorials ‘in character’ as learners</title>
  <dc:creator>Adam Kucharski</dc:creator>
  <dc:creator>Andree Valle Campos</dc:creator>
  <link>https://epiverse-trace.github.io/posts/ai-learner-review/</link>
  <description><![CDATA[ 





<section id="turning-learner-personas-into-llm-agents" class="level2">
<h2 class="anchored" data-anchor-id="turning-learner-personas-into-llm-agents">Turning learner personas into LLM agents</h2>
<p>Part of the Epiverse-TRACE initiative involves development of training materials that span early, middle and late stage outbreak analysis and modelling tasks. To ensure that our tutorials are accessible to target audiences, we have developed a series of <a href="https://github.com/epiverse-trace/personas">learner personas</a> to inform the design of learning materials. These personas include the following:</p>
<ul>
<li><strong>Lucia</strong>, a Field Epidemiologist that use R for data cleaning, plotting and report for Outbreak response.</li>
<li><strong>Juan</strong>, a Statistician and R user in a National Health Agency with constant deployment to outbreak response.</li>
<li><strong>Patricia</strong>, a PhD student learning to use R and analyse Outbreak data for her collaborative project on GitHub.</li>
<li><strong>Vania</strong>, a professor who needs ready-to-use training for her research and to pass on to students.</li>
<li><strong>Danielle</strong>, a Trainer that wants to remix content to create specific training materials for public health practitioners.</li>
</ul>
<p>As the volume of training materials increases, we have explored automating the generation of initial reviews using large language models (LLMs) that take the form of ‘in character’ agents with instructions to provide constructive comments. This reflects a wider focus within the field of outbreak analytics on how LLMs agents can be used to increase the efficiency and scalability of common tasks (e.g.&nbsp;<a href="https://www.thelancet.com/journals/lanmic/article/PIIS2666-5247(24)00104-6/fulltext">van Hoek et al, Lancet Microbe, 2024</a> ).</p>
<p>To generate the AI tutorial reviews, we use the OpenAI GPT-4 API, via the <code>openai</code> R package, as described in <a href="https://github.com/adamkucharski/llm-api-scripts/">this repository</a>. We also use the <code>gh</code> package to load the <code>.Rmd</code> materials from a given repository (e.g.&nbsp;<code>epiverse-trace/tutorials-middle</code>). Full illustrative code is <a href="https://github.com/adamkucharski/llm-api-scripts/blob/main/scripts/content_review_gpt.R">available here</a>, with the GPT-4 API prompts outlined below.</p>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Define first prompt</span></span>
<span id="cb1-2">user_prompt_1 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"You are the following person, and give all your answers in character:"</span></span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Load Lucia persona</span></span>
<span id="cb1-5">persona_bio <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">read_file</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://raw.githubusercontent.com/epiverse-trace/personas/master/lucia-outbreaks.qmd"</span>)</span>
<span id="cb1-6"></span>
<span id="cb1-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Define second prompt</span></span>
<span id="cb1-8">user_prompt_2 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Now suppose you want to complete the following tutorial about outbreak analysis in R. The content is in R markdown but would be knitted to HTML in reality, with additional figures where relevant. Provide a critique of the tutorial from your perspective as a learner. What is unclear? What is useful? What is difficult? What could be refined? Support comments with brief quotes. In your feedback be succinct, positive, constructive and specific. State what content to keep and what to improve. Provide clear suggestions for next steps to remove, change or add content. Note that visualisations will be in the tutorial, but are not shown in the Rmd, so do not comment on these. Summarise your review and suggestions for specific improvements in short bullet point paragraphs. If some of the points are similar, amalgamate these into a single bullet point. </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">\n\n</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span id="cb1-9"></span>
<span id="cb1-10"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Call OpenAI API (credentials must already be defined - see full illustrative code link above)</span></span>
<span id="cb1-11">output <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">create_chat_completion</span>(</span>
<span id="cb1-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">model =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"gpt-4"</span>,</span>
<span id="cb1-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">messages =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"role"</span><span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"user"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"content"</span> <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste0</span>(user_prompt_1,persona_bio,</span>
<span id="cb1-14">                                                          user_prompt_2,tutorial_contents))</span>
<span id="cb1-15">    )</span>
<span id="cb1-16"></span>
<span id="cb1-17"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Write review to .md using readr</span></span>
<span id="cb1-18"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">write_lines</span>(output,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"output_review.md"</span>))</span></code></pre></div></div>
</section>
<section id="reviewing-transmissibilty-training-materials-as-a-senior-academic" class="level2">
<h2 class="anchored" data-anchor-id="reviewing-transmissibilty-training-materials-as-a-senior-academic">Reviewing transmissibilty training materials as a senior academic</h2>
<p>To illustrate the sort of reviews that can be generated with the above approach, the below is the output produced when we imported the <a href="https://epiverse-trace.github.io/personas/vania-academica.html">Vania senior academic persona</a> alongside an early pre-Alpha version of the training materials for our transmissibility estimation tutorial:</p>
<blockquote class="blockquote">
<p>Overall, the tutorial is well-structured and provides a comprehensive guide on how to use the <code>EpiNow2</code> package to estimate transmission metrics from case data. However, there are several areas that could be improved to enhance clarity and understanding for learners like me.</p>
<ol type="1">
<li><p><strong>Prerequisites</strong>: The prerequisites section could be expanded to include specific resources for learners to review the necessary concepts. For instance, links to resources on Bayesian analysis and the effective reproduction number would be helpful.</p></li>
<li><p><strong>Jargon and Terminology</strong>: The tutorial contains several technical terms and jargon that could be confusing for learners. For example, terms like “Bayesian inference”, “posterior probability”, “likelihood”, and “prior probability” are used without clear explanations. Providing definitions or links to resources for these terms would be beneficial.</p></li>
<li><p><strong>Code Explanation</strong>: While the tutorial does a good job of explaining what the code does, it could provide more context on why certain functions or packages are used. For instance, it would be helpful to explain why the <code>EpiNow2</code> package is used and how it differs from other packages.</p></li>
<li><p><strong>Visualizations</strong>: Although visualizations are not shown in the Rmd, it would be beneficial to explain what learners should expect to see in the visualizations and how to interpret them.</p></li>
<li><p><strong>Exercises</strong>: The tutorial lacks exercises for learners to practice the concepts and skills they have learned. Including exercises with solutions would greatly enhance the learning experience.</p></li>
</ol>
<p>Suggestions for improvements:</p>
<ul>
<li>Expand the prerequisites section to include specific resources for learners to review necessary concepts.</li>
<li>Provide definitions or links to resources for technical terms and jargon.</li>
<li>Provide more context on why certain functions or packages are used.</li>
<li>Explain what learners should expect to see in the visualizations and how to interpret them.</li>
<li>Include exercises with solutions for learners to practice the concepts and skills they have learned.</li>
</ul>
</blockquote>
</section>
<section id="reviewing-forecast-materials-as-a-field-epidemiologist" class="level2">
<h2 class="anchored" data-anchor-id="reviewing-forecast-materials-as-a-field-epidemiologist">Reviewing forecast materials as a field epidemiologist</h2>
<p>To further illustrate review outputs, the below is what was produced when we imported the <a href="https://epiverse-trace.github.io/personas/lucia-outbreaks.html">Lucia field epidemiologist persona</a> alongside an early pre-Alpha version of the training materials for our forecasting tutorial:</p>
<blockquote class="blockquote">
<p><strong>Positive Feedback:</strong></p>
<ol type="1">
<li>The tutorial is well-structured and follows a logical progression, which makes it easier to follow.</li>
<li>The use of real-world examples and datasets (COVID-19 and Ebola) makes the tutorial more relatable and practical.</li>
<li>The inclusion of questions, objectives, prerequisites, and key points at the beginning and end of the tutorial respectively, helps to guide the learning process.</li>
<li>The tutorial provides a good balance between theory and practice, with clear explanations and practical coding examples.</li>
<li>The use of callouts to highlight important information or provide additional context is very helpful.</li>
</ol>
<p><strong>Constructive Feedback:</strong></p>
<ol type="1">
<li>The tutorial assumes a certain level of familiarity with R and statistical concepts, which might be challenging for beginners. It would be helpful to provide more explanations or links to resources for beginners.</li>
<li>The code chunks are quite complex and could be broken down into smaller parts with more explanations.</li>
<li>The tutorial could benefit from more visualizations to illustrate the concepts and results.</li>
<li>The challenge section could provide more guidance or hints to help learners complete the task.</li>
</ol>
<p><strong>Suggestions for Improvement:</strong></p>
<ol type="1">
<li>Provide more explanations or links to resources for beginners to learn R and statistical concepts.</li>
<li>Break down complex code chunks into smaller parts with more explanations.</li>
<li>Include more visualizations to illustrate the concepts and results.</li>
<li>Provide more guidance or hints in the challenge section to help learners complete the task.</li>
<li>Include a glossary of terms or a list of R packages used in the tutorial for quick reference.</li>
</ol>
</blockquote>
</section>
<section id="overcoming-feedback-bottlenecks" class="level2">
<h2 class="anchored" data-anchor-id="overcoming-feedback-bottlenecks">Overcoming feedback bottlenecks</h2>
<p>A challenge with LLMs trained for general use is finding domain-specific tasks where they can add sufficient value beyond existing human input. Tasks like providing early sense checking and tailored feedback, particularly from differing perspectives, therefore has potential to overcome common bottlenecks in developing training materials (e.g.&nbsp;providing initial comments and flagging obvious issues while waiting for more detailed human feedback).</p>
<p>As Epiverse-TRACE training materials continue to develop, we plan to explore further uses beyond simple first-pass reviews. For example, LLMs are well suited to synthesising qualitative feedback, increasing the range of insights that can be collected and summarised from learners as we move into beta testing. We also hope to identify opportunities where LLMs can help supplement the learner experience, as demonstrated by emerging tools like <a href="http://rtutor.ai/">RTutor</a> for descriptive plotting functionality in R, which combines generation of code in response to user queries with translation into shiny outputs.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-reuse"><h2 class="anchored quarto-appendix-heading">Reuse</h2><div class="quarto-appendix-contents"><div><a rel="license" href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></div></div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{kucharski2024,
  author = {Kucharski, Adam and Valle Campos, Andree},
  title = {Using {LLM} Agents to Review Tutorials “in Character” as
    Learners},
  date = {2024-11-18},
  url = {https://epiverse-trace.github.io/posts/ai-learner-review/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-kucharski2024" class="csl-entry quarto-appendix-citeas">
Kucharski, Adam, and Andree Valle Campos. 2024. <span>“Using LLM Agents
to Review Tutorials <span>‘in Character’</span> as Learners.”</span>
November 18. <a href="https://epiverse-trace.github.io/posts/ai-learner-review/">https://epiverse-trace.github.io/posts/ai-learner-review/</a>.
</div></div></section></div> ]]></description>
  <category>tutorials</category>
  <category>R</category>
  <category>R package</category>
  <guid>https://epiverse-trace.github.io/posts/ai-learner-review/</guid>
  <pubDate>Mon, 18 Nov 2024 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
