<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Research on Stats and R</title>
    <link>https://statsandr.com/tags/research/</link>
    <description>Recent content in Research on Stats and R</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 07 Apr 2026 00:00:00 +0000</lastBuildDate>
    
	<atom:link href="https://statsandr.com/tags/research/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>EM-DAT, the world&#39;s disaster memory, is at risk</title>
      <link>https://statsandr.com/blog/em-dat-the-world-s-disaster-memory-is-at-risk/</link>
      <pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/em-dat-the-world-s-disaster-memory-is-at-risk/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/em-dat-the-world-s-disaster-memory-is-at-risk.jpg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I do not usually write posts that are calls to action. But sometimes, something important enough comes along that it would feel wrong to stay silent. This is one of those times.&lt;/p&gt;
&lt;div id=&#34;what-is-em-dat&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;What is EM-DAT?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://www.emdat.be/&#34;&gt;EM-DAT&lt;/a&gt;, the Emergency Events Database, is the world’s most widely used and trusted global database for tracking natural and technological disasters. It has been maintained since 1988 by the &lt;strong&gt;Centre for Research on the Epidemiology of Disasters (CRED)&lt;/strong&gt;, which is part of UCLouvain.&lt;/p&gt;
&lt;p&gt;The database currently contains data on the occurrence and impacts of &lt;strong&gt;over 27,000 mass disasters&lt;/strong&gt; worldwide, from 1900 to the present day. It covers floods, storms, earthquakes, droughts, wildfires, extreme temperatures, landslides, volcanic activity, and technological accidents, across virtually every country on earth.&lt;/p&gt;
&lt;p&gt;Crucially, it is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Open access&lt;/strong&gt; (for non-commercial use)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Globally comparable&lt;/strong&gt;, using transparent and consistent inclusion criteria&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cross-verified&lt;/strong&gt; across multiple sources (UN agencies, NGOs, reinsurance companies, research institutes, press agencies)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;reference dataset&lt;/strong&gt; for thousands of peer-reviewed studies, national risk assessments, and international policy processes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have ever read a paper or report about global disaster trends, the probability is high that EM-DAT was the data source behind it.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;why-is-it-at-risk&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Why is it at risk?&lt;/h2&gt;
&lt;p&gt;For more than 25 years, EM-DAT was primarily funded by the &lt;strong&gt;United States Agency for International Development (USAID)&lt;/strong&gt;. Following the recent dismantling of USAID, that funding is gone, and no sustainable alternative has been secured.&lt;/p&gt;
&lt;p&gt;This is not a minor budget shortfall. Without a replacement funding mechanism, EM-DAT risks shutting down entirely.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;why-does-it-matter&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Why does it matter?&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;https://openletter.earth/the-worlds-collective-disaster-memory-must-be-preserved-66c88c44&#34;&gt;open letter&lt;/a&gt; drafted in support of EM-DAT puts it well: in an era of intensifying climate extremes, cascading risks, and compounding crises, reliable data are not a luxury. They are the infrastructure for informed decision-making.&lt;/p&gt;
&lt;p&gt;Concretely, EM-DAT underpins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Disaster risk reduction and prevention policies&lt;/strong&gt;, used by governments to assess national risks and prioritise investments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Humanitarian operations&lt;/strong&gt;, relied upon by multilateral agencies and NGOs to plan and forecast needs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Climate research&lt;/strong&gt;, providing historical baselines for understanding trends in extreme weather events&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitoring of global commitments&lt;/strong&gt;, such as the Sendai Framework for Disaster Risk Reduction, the SDGs, and the Paris Agreement&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Insurance and risk modelling&lt;/strong&gt;, used by the private sector alongside other data to benchmark losses and refine exposure models&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;EM-DAT’s value is not just in the quantity of records. It lies in the &lt;strong&gt;rigour and consistency&lt;/strong&gt; of its methodology over time and across countries. That is exactly what makes it irreplaceable. In a world awash with data, curated and quality-controlled datasets of this kind are rare. If EM-DAT were to close, the result would not be a smooth substitution. It would be fragmentation, proprietary data silos, and reduced access, particularly for lower-income countries that are already under-represented in global evidence.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;a-personal-note&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;A personal note&lt;/h2&gt;
&lt;p&gt;I signed the open letter after being informed of the issue by my colleague Prof. Niko Speybroeck, a leading epidemiologist at UCLouvain and program director of the CRED.&lt;/p&gt;
&lt;p&gt;I do not have direct expertise in disaster epidemiology. But I do care about open data, open science, and the integrity of global research infrastructure. And EM-DAT is exactly the kind of resource that the whole scientific community relies on, often without fully realising it.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;how-you-can-help&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;How you can help&lt;/h2&gt;
&lt;p&gt;If you share these values, I encourage you to &lt;a href=&#34;https://openletter.earth/the-worlds-collective-disaster-memory-must-be-preserved-66c88c44&#34;&gt;sign the open letter: “The World’s collective disaster memory must be preserved”&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The letter calls on governments, multilateral development banks, philanthropic foundations, and international organisations to step forward with a coordinated and sustainable funding arrangement for EM-DAT. The cost of maintaining the world’s primary disaster database is modest set against the billions spent on disaster response and recovery each year. The cost of losing it would be profound.&lt;/p&gt;
&lt;p&gt;Please also consider sharing this post or the open letter with your own network (researchers, policymakers, students, practitioners, or anyone who cares about data-driven approaches to global challenges).&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;more-information&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;More information&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;EM-DAT website: &lt;a href=&#34;https://www.emdat.be/&#34; class=&#34;uri&#34;&gt;https://www.emdat.be/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Open letter: &lt;a href=&#34;https://openletter.earth/the-worlds-collective-disaster-memory-must-be-preserved-66c88c44&#34; class=&#34;uri&#34;&gt;https://openletter.earth/the-worlds-collective-disaster-memory-must-be-preserved-66c88c44&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CRED at UCLouvain: &lt;a href=&#34;https://www.uclouvain.be/en/research-institutes/irss/cred-epidemiology-of-disasters&#34; class=&#34;uri&#34;&gt;https://www.uclouvain.be/en/research-institutes/irss/cred-epidemiology-of-disasters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As always, if you have any thoughts or questions related to this post, feel free to leave a comment below.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Effectiveness of pneumococcal conjugate vaccines against invasive pneumococcal disease in Vietnamese children prior to national introduction: A matched case-control study&#39;</title>
      <link>https://statsandr.com/blog/paper-effectiveness-of-pneumococcal-conjugate-vaccines-against-invasive-pneumococcal-disease-in-vietnamese-children-prior-to-national-introduction-a-matched-case-control-study/</link>
      <pubDate>Tue, 17 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-effectiveness-of-pneumococcal-conjugate-vaccines-against-invasive-pneumococcal-disease-in-vietnamese-children-prior-to-national-introduction-a-matched-case-control-study/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/Effectiveness%20of%20pneumococcal%20conjugate%20vaccines%20against%20invasive%20pneumococcal%20disease%20in%20Vietnamese%20children%20prior%20to%20national%20introduction-%20A%20matched%20case-control%20study.jpg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to share that an article I contributed to has just been published in &lt;em&gt;Vaccine&lt;/em&gt; &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-TRUONG2026128349&#34;&gt;Truong et al. 2026&lt;/a&gt;)&lt;/span&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Effectiveness of pneumococcal conjugate vaccines against invasive pneumococcal disease in Vietnamese children prior to national introduction: A matched case-control study&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;🔗 &lt;a href=&#34;https://doi.org/10.1016/j.vaccine.2026.128349&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1016/j.vaccine.2026.128349&lt;/a&gt;&lt;/p&gt;
&lt;div id=&#34;background&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Streptococcus pneumoniae&lt;/em&gt; remains a major cause of severe illness and death in young children worldwide. Pneumococcal conjugate vaccines (PCVs) have dramatically reduced invasive pneumococcal disease (IPD) in countries where they are part of national immunization programs.&lt;/p&gt;
&lt;p&gt;In Vietnam, however, PCV10 and PCV13 have so far only been available in the private sector, resulting in relatively low and unequal coverage. Until now, real-world evidence on vaccine effectiveness in the Vietnamese context was limited.&lt;/p&gt;
&lt;p&gt;This study builds on earlier surveillance work conducted in southern Vietnam. In particular, our previous study on &lt;a href=&#34;https://statsandr.com/blog/paper-childhood-bacterial-meningitis-surveillance-southern-vietnam/&#34;&gt;Childhood bacterial meningitis surveillance in southern Vietnam&lt;/a&gt; (see also the associated publication in &lt;em&gt;Open Forum Infectious Diseases&lt;/em&gt;: &lt;span class=&#34;citation&#34;&gt;&lt;span class=&#34;nocase&#34;&gt;Truong et al.&lt;/span&gt; (&lt;a href=&#34;#ref-truong2023childhood&#34;&gt;2023&lt;/a&gt;)&lt;/span&gt;) documented trends in invasive bacterial meningitis and highlighted the persistent burden of pneumococcal disease prior to widespread PCV implementation.&lt;/p&gt;
&lt;p&gt;The present study extends that work by moving from &lt;strong&gt;surveillance and descriptive epidemiology&lt;/strong&gt; to &lt;strong&gt;evaluation of vaccine effectiveness&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;what-this-study-did&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;What this study did&lt;/h2&gt;
&lt;p&gt;We conducted a matched case–control study in southern Vietnam among children aged 2–59 months.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cases&lt;/strong&gt;: children hospitalized with culture-confirmed invasive pneumococcal disease&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Controls&lt;/strong&gt;: age- and neighborhood-matched community children&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using conditional logistic regression, vaccine effectiveness was estimated as:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[
VE = (1 - \text{adjusted odds ratio}) \times 100\%.
\]&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;main-findings&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Main findings&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Both &lt;strong&gt;PCV10 and PCV13 provided substantial protection&lt;/strong&gt; against vaccine-type IPD.&lt;/li&gt;
&lt;li&gt;Meaningful protection was observed &lt;strong&gt;despite low coverage&lt;/strong&gt; and private-sector availability only.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Serotype 19A&lt;/strong&gt; was predominant among cases.&lt;/li&gt;
&lt;li&gt;We observed evidence of &lt;strong&gt;waning protection over time&lt;/strong&gt;, suggesting the importance of appropriate booster schedules.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Together, these findings provide the first real-world effectiveness estimates from Vietnam and offer timely evidence to inform national decisions on vaccine introduction, product selection, and schedule design.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;why-this-matters&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Why this matters&lt;/h2&gt;
&lt;p&gt;Policy decisions about vaccine introduction often rely on data from high-income countries. However, epidemiological patterns, serotype distribution, vaccine uptake, and health system factors can differ substantially across settings.&lt;/p&gt;
&lt;p&gt;Generating &lt;strong&gt;local effectiveness evidence&lt;/strong&gt; is therefore crucial for evidence-based public health decisions.&lt;/p&gt;
&lt;p&gt;With Vietnam preparing for national PCV introduction, these results contribute to a stronger empirical foundation for implementation.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;acknowledgments&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;I am grateful to Niko Speybroeck and Hieu Cong Truong for including me in this research project, and all co-authors and collaborators in Vietnam and Belgium for the excellent teamwork behind this study.&lt;/p&gt;
&lt;p&gt;I hope this paper will, to some extent, be helpful for your research.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2 unnumbered&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-TRUONG2026128349&#34; class=&#34;csl-entry&#34;&gt;
Truong, Hieu Cong, Quang Duy Pham, Thanh Van Phan, et al. 2026. &lt;span&gt;“Effectiveness of Pneumococcal Conjugate Vaccines Against Invasive Pneumococcal Disease in Vietnamese Children Prior to National Introduction: A Matched Case-Control Study.”&lt;/span&gt; &lt;em&gt;Vaccine&lt;/em&gt; 77: 128349. &lt;a href=&#34;https://doi.org/10.1016/j.vaccine.2026.128349&#34;&gt;https://doi.org/10.1016/j.vaccine.2026.128349&lt;/a&gt;.
&lt;/div&gt;
&lt;div id=&#34;ref-truong2023childhood&#34; class=&#34;csl-entry&#34;&gt;
&lt;span class=&#34;nocase&#34;&gt;Truong, Hieu Cong, Thanh Van Phan, Hung Thanh Nguyen, et al.&lt;/span&gt; 2023. &lt;span&gt;“Childhood Bacterial Meningitis Surveillance in Southern Vietnam: Trends and Vaccination Implications from 2012 to 2021.”&lt;/span&gt; &lt;em&gt;Open Forum Infectious Diseases&lt;/em&gt;, ofad229. &lt;a href=&#34;https://doi.org/10.1093/ofid/ofad229&#34;&gt;https://doi.org/10.1093/ofid/ofad229&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>nycOpenData: A unified R interface to NYC Open Data APIs</title>
      <link>https://statsandr.com/blog/nycopendata-a-unified-r-interface-to-nyc-open-data-apis/</link>
      <pubDate>Tue, 27 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/nycopendata-a-unified-r-interface-to-nyc-open-data-apis/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/nycopendata-a-unified-r-interface-to-nyc-open-data-apis.jpg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Guest post by Christian Martinez, developer of the nycOpenData package in R.&lt;/em&gt;&lt;/p&gt;
&lt;div id=&#34;nycopendata-a-unified-r-interface-to-nyc-open-data-apis&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;nycOpenData: A unified R interface to NYC Open Data APIs&lt;/h1&gt;
&lt;p&gt;I am pleased to announce the release of &lt;code&gt;nycOpenData&lt;/code&gt;, an R package providing convenient, tidy access to dozens of datasets from the &lt;a href=&#34;https://opendata.cityofnewyork.us/&#34;&gt;New York City Open Data platform&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The package is designed as part of an open-science and reproducible-research effort, with the goal of lowering the friction between public data and statistical analysis—especially for teaching, exploratory research, and applied civic work.&lt;/p&gt;
&lt;div id=&#34;why-nycopendata&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Why nycOpenData?&lt;/h2&gt;
&lt;p&gt;NYC Open Data hosts hundreds of datasets covering topics such as public safety, housing, transportation, education, health, and city services. While these datasets are publicly accessible through the Socrata API, working with them directly often requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;knowing dataset identifiers,&lt;/li&gt;
&lt;li&gt;manually constructing API queries,&lt;/li&gt;
&lt;li&gt;handling pagination, timeouts, and rate limits,&lt;/li&gt;
&lt;li&gt;and performing repetitive data-cleaning steps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These barriers can slow down exploratory analysis and make public data less accessible to students, researchers, and practitioners who primarily work in R.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nycOpenData&lt;/code&gt; was built to remove these obstacles by providing a consistent, user-friendly interface that returns clean tibbles ready for analysis—without requiring users to interact directly with the API.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;what-does-the-package-do&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;What does the package do?&lt;/h2&gt;
&lt;p&gt;The package provides a growing collection of wrapper functions, each corresponding to a specific NYC Open Data dataset or dataset family. All functions follow a shared design pattern and support:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;row limits,&lt;/li&gt;
&lt;li&gt;optional filtering via named lists,&lt;/li&gt;
&lt;li&gt;sorting,&lt;/li&gt;
&lt;li&gt;and graceful handling of API errors and timeouts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Examples of currently supported domains include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;311 service requests&lt;/li&gt;
&lt;li&gt;Transportation and for-hire vehicles&lt;/li&gt;
&lt;li&gt;Motor vehicle collisions&lt;/li&gt;
&lt;li&gt;Department of Buildings permits and complaints&lt;/li&gt;
&lt;li&gt;Education and school reporting&lt;/li&gt;
&lt;li&gt;Juvenile justice and public safety&lt;/li&gt;
&lt;li&gt;Street trees and environmental data&lt;/li&gt;
&lt;li&gt;Permitted events (historical)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A typical call looks like this:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(nycOpenData)

nyc_311(
  limit = 1000,
  filters = list(borough = &amp;quot;BROOKLYN&amp;quot;)
)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 1,000 × 40
##    unique_key created_date          agency agency_name complaint_type descriptor
##    &amp;lt;chr&amp;gt;      &amp;lt;chr&amp;gt;                 &amp;lt;chr&amp;gt;  &amp;lt;chr&amp;gt;       &amp;lt;chr&amp;gt;          &amp;lt;chr&amp;gt;     
##  1 67613985   2026-01-26T02:06:05.… NYPD   New York C… Noise - Resid… Banging/P…
##  2 67609553   2026-01-26T02:02:09.… NYPD   New York C… Noise - Resid… Banging/P…
##  3 67610990   2026-01-26T01:58:58.… NYPD   New York C… Illegal Parki… Blocked H…
##  4 67615428   2026-01-26T01:56:49.… NYPD   New York C… Noise - Resid… Banging/P…
##  5 67609568   2026-01-26T01:48:16.… NYPD   New York C… Noise - Resid… Loud Musi…
##  6 67612476   2026-01-26T01:47:10.… NYPD   New York C… Noise - Resid… Loud Musi…
##  7 67614152   2026-01-26T01:46:26.… DSNY   Department… Snow or Ice    Snow Trac…
##  8 67614054   2026-01-26T01:44:50.… DSNY   Department… Dirty Conditi… Trash     
##  9 67606570   2026-01-26T01:41:32.… NYPD   New York C… Noise - Resid… Banging/P…
## 10 67610091   2026-01-26T01:35:51.… NYPD   New York C… Noise - Vehic… Car/Truck…
## # ℹ 990 more rows
## # ℹ 34 more variables: location_type &amp;lt;chr&amp;gt;, incident_zip &amp;lt;chr&amp;gt;,
## #   incident_address &amp;lt;chr&amp;gt;, street_name &amp;lt;chr&amp;gt;, cross_street_1 &amp;lt;chr&amp;gt;,
## #   cross_street_2 &amp;lt;chr&amp;gt;, intersection_street_1 &amp;lt;chr&amp;gt;,
## #   intersection_street_2 &amp;lt;chr&amp;gt;, address_type &amp;lt;chr&amp;gt;, city &amp;lt;chr&amp;gt;,
## #   landmark &amp;lt;chr&amp;gt;, status &amp;lt;chr&amp;gt;, community_board &amp;lt;chr&amp;gt;,
## #   council_district &amp;lt;chr&amp;gt;, police_precinct &amp;lt;chr&amp;gt;, bbl &amp;lt;chr&amp;gt;, borough &amp;lt;chr&amp;gt;, …&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The result is returned as a tidy tibble of the 1,000 most recent NYC 311 requests, making it immediately compatible with the tidyverse ecosystem for visualization, modeling, and reporting.&lt;/p&gt;
&lt;div id=&#34;mini-analysis&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Mini analysis&lt;/h3&gt;
&lt;p&gt;One of the strongest qualities this function has is its ability to filter based on multiple columns. Let’s put everything together and get a dataset of the last &lt;em&gt;1,000&lt;/em&gt; 311 requests from the New York Police Department in Brooklyn.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Creating the dataset
brooklyn_nypd &amp;lt;- nyc_311(limit = 1000, filters = list(agency = &amp;quot;NYPD&amp;quot;, borough = &amp;quot;BROOKLYN&amp;quot;))

# Calling head of our new dataset
head(brooklyn_nypd)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## # A tibble: 6 × 39
##   unique_key created_date           agency agency_name complaint_type descriptor
##   &amp;lt;chr&amp;gt;      &amp;lt;chr&amp;gt;                  &amp;lt;chr&amp;gt;  &amp;lt;chr&amp;gt;       &amp;lt;chr&amp;gt;          &amp;lt;chr&amp;gt;     
## 1 67613985   2026-01-26T02:06:05.0… NYPD   New York C… Noise - Resid… Banging/P…
## 2 67609553   2026-01-26T02:02:09.0… NYPD   New York C… Noise - Resid… Banging/P…
## 3 67610990   2026-01-26T01:58:58.0… NYPD   New York C… Illegal Parki… Blocked H…
## 4 67615428   2026-01-26T01:56:49.0… NYPD   New York C… Noise - Resid… Banging/P…
## 5 67609568   2026-01-26T01:48:16.0… NYPD   New York C… Noise - Resid… Loud Musi…
## 6 67612476   2026-01-26T01:47:10.0… NYPD   New York C… Noise - Resid… Loud Musi…
## # ℹ 33 more variables: location_type &amp;lt;chr&amp;gt;, incident_zip &amp;lt;chr&amp;gt;,
## #   incident_address &amp;lt;chr&amp;gt;, street_name &amp;lt;chr&amp;gt;, cross_street_1 &amp;lt;chr&amp;gt;,
## #   cross_street_2 &amp;lt;chr&amp;gt;, intersection_street_1 &amp;lt;chr&amp;gt;,
## #   intersection_street_2 &amp;lt;chr&amp;gt;, address_type &amp;lt;chr&amp;gt;, city &amp;lt;chr&amp;gt;,
## #   landmark &amp;lt;chr&amp;gt;, status &amp;lt;chr&amp;gt;, community_board &amp;lt;chr&amp;gt;,
## #   council_district &amp;lt;chr&amp;gt;, police_precinct &amp;lt;chr&amp;gt;, bbl &amp;lt;chr&amp;gt;, borough &amp;lt;chr&amp;gt;,
## #   x_coordinate_state_plane &amp;lt;chr&amp;gt;, y_coordinate_state_plane &amp;lt;chr&amp;gt;, …&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Quick check to make sure our filtering worked
nrow(brooklyn_nypd)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] 1000&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;unique(brooklyn_nypd$agency)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] &amp;quot;NYPD&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;unique(brooklyn_nypd$borough)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] &amp;quot;BROOKLYN&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We successfully created our dataset that contains the 1,000 most recent requests regarding the NYPD in the borough Brooklyn.&lt;/p&gt;
&lt;p&gt;Now that we have successfully pulled the data and have it in R, let’s figure out what NYC residents in Brooklyn are complaining about to the NYPD.&lt;/p&gt;
&lt;p&gt;To do this, we will create a &lt;a href=&#34;https://statsandr.com/blog/graphics-in-r-with-ggplot2/#barplot&#34;&gt;bar graph&lt;/a&gt; of the complaint types.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Visualizing the distribution, ordered by frequency
library(ggplot2)

ggplot(brooklyn_nypd, aes(y = reorder(complaint_type, complaint_type, length))) +
  geom_bar(fill = &amp;quot;steelblue&amp;quot;) +
  theme_minimal() +
  labs(
    title = &amp;quot;Most Recent NYPD 311 Complaints (Brooklyn)&amp;quot;,
    subtitle = &amp;quot;Top 1,000 service requests&amp;quot;,
    x = &amp;quot;Number of Complaints&amp;quot;,
    y = &amp;quot;Type of Complaint&amp;quot;
  )&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;figure&#34; style=&#34;text-align: center&#34;&gt;&lt;span style=&#34;display:block;&#34; id=&#34;fig:complaint-type-graph&#34;&gt;&lt;/span&gt;
&lt;img src=&#34;https://statsandr.com/blog/nycopendata-a-unified-r-interface-to-nyc-open-data-apis/index_files/figure-html/complaint-type-graph-1.png&#34; alt=&#34;Bar chart showing the frequency of NYPD-related 311 complaint types in Brooklyn from the 1,000 most recent service requests.&#34; width=&#34;100%&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;
Figure 1: Bar chart showing the frequency of NYPD-related 311 complaint types in Brooklyn from the 1,000 most recent service requests.
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This graph shows us not only &lt;em&gt;which&lt;/em&gt; complaints were made, but &lt;em&gt;how many&lt;/em&gt; of each complaint were made.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;designed-for-reproducible-workflows&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Designed for reproducible workflows&lt;/h2&gt;
&lt;p&gt;A core design principle of &lt;code&gt;nycOpenData&lt;/code&gt; is reproducibility. Rather than downloading static CSV files that can change over time or be accidentally modified, analyses can explicitly document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;which dataset was used,&lt;/li&gt;
&lt;li&gt;how many rows were requested,&lt;/li&gt;
&lt;li&gt;which filters were applied,&lt;/li&gt;
&lt;li&gt;and when the data were accessed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This makes the package particularly useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;reproducible research projects,&lt;/li&gt;
&lt;li&gt;classroom assignments,&lt;/li&gt;
&lt;li&gt;data journalism,&lt;/li&gt;
&lt;li&gt;and exploratory civic analysis.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The package is also designed to be API-polite, with configurable timeouts and safeguards that help prevent common failure modes when querying large public datasets.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;who-is-it-for&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Who is it for?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;nycOpenData&lt;/code&gt; is intended for a broad audience, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;students learning statistics or data science using real-world data,&lt;/li&gt;
&lt;li&gt;instructors teaching reproducible research or applied data analysis,&lt;/li&gt;
&lt;li&gt;researchers conducting exploratory or descriptive analyses,&lt;/li&gt;
&lt;li&gt;data journalists and civic technologists,&lt;/li&gt;
&lt;li&gt;and anyone interested in working with NYC public data in R.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is not to abstract away the data itself, but to make access predictable, transparent, and easy to integrate into standard R workflows.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;availability&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Availability&lt;/h2&gt;
&lt;p&gt;The package is available on CRAN and can be installed using:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;nycOpenData&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Development continues on GitHub, where new datasets and improvements are added regularly.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;acknowledgements&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;This package was developed alongside teaching and applied research projects in reproducible data science, with inspiration from open-source contributors across the R community and the NYC Open Data program.&lt;/p&gt;
&lt;p&gt;Useful links&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CRAN package: &lt;a href=&#34;https://CRAN.R-project.org/package=nycOpenData&#34; class=&#34;uri&#34;&gt;https://CRAN.R-project.org/package=nycOpenData&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;pkgdown site: &lt;a href=&#34;https://martinezc1.github.io/nycOpenData/&#34; class=&#34;uri&#34;&gt;https://martinezc1.github.io/nycOpenData/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GitHub repository: &lt;a href=&#34;https://github.com/martinezc1/nycOpenData&#34; class=&#34;uri&#34;&gt;https://github.com/martinezc1/nycOpenData&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;NYC Open Data portal: &lt;a href=&#34;https://opendata.cityofnewyork.us/&#34; class=&#34;uri&#34;&gt;https://opendata.cityofnewyork.us/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As always, feedback, bug reports, and dataset requests are very welcome.&lt;/p&gt;
&lt;p&gt;Thanks for reading!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>AssociationExplorer: A user-friendly shiny application for exploring associations and visual patterns</title>
      <link>https://statsandr.com/blog/associationexplorer-a-user-friendly-shiny-application-for-exploring-associations-and-visual-patterns/</link>
      <pubDate>Tue, 16 Dec 2025 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/associationexplorer-a-user-friendly-shiny-application-for-exploring-associations-and-visual-patterns/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/associationexplorer-a-user-friendly-shiny-application-for-exploring-associations-and-visual-patterns.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am pleased to announce the publication of our paper “AssociationExplorer: A user-friendly Shiny application for exploring associations and visual patterns” in the journal &lt;em&gt;SoftwareX&lt;/em&gt;, together with the official release of the AssociationExplorer2 R package on CRAN.&lt;/p&gt;
&lt;p&gt;Both the paper and the software are part of an open-science effort aimed at making exploratory data analysis more accessible to non-technical users.&lt;/p&gt;
&lt;div id=&#34;why-associationexplorer&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Why AssociationExplorer?&lt;/h2&gt;
&lt;p&gt;Exploring multivariate datasets is now central in social sciences, data journalism, and education. However, identifying and interpreting associations between variables often requires programming skills and a solid background in statistics, which can represent a substantial barrier for many users.&lt;/p&gt;
&lt;p&gt;AssociationExplorer was designed to lower this barrier by providing an interactive, visual, and statistically grounded tool for exploring associations between quantitative and qualitative variables, without requiring users to write any code.&lt;/p&gt;
&lt;p&gt;The application is primarily intended for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;journalists and data journalism practitioners,&lt;/li&gt;
&lt;li&gt;teachers and students,&lt;/li&gt;
&lt;li&gt;researchers in the exploratory phase of an analysis,&lt;/li&gt;
&lt;li&gt;engaged citizens interested in understanding public or survey data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;what-does-the-app-do&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;What does the app do?&lt;/h2&gt;
&lt;p&gt;AssociationExplorer follows a simple and guided workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Import data (CSV or Excel files)&lt;/li&gt;
&lt;li&gt;Interactively select variables of interest&lt;/li&gt;
&lt;li&gt;Automatically compute association measures adapted to variable types:
&lt;ul&gt;
&lt;li&gt;Pearson’s &lt;span class=&#34;math inline&#34;&gt;\(r\)&lt;/span&gt; correlation for numeric–numeric pairs,&lt;/li&gt;
&lt;li&gt;Cramer’s V for categorical–categorical pairs,&lt;/li&gt;
&lt;li&gt;the correlation ratio &lt;span class=&#34;math inline&#34;&gt;\(\eta\)&lt;/span&gt; for mixed numeric–categorical pairs&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Filter associations using user-defined thresholds&lt;/li&gt;
&lt;li&gt;Visualize results through:
&lt;ul&gt;
&lt;li&gt;an interactive correlation network,&lt;/li&gt;
&lt;li&gt;contextual bivariate visualizations (scatter plots, mean plots, and colored contingency tables)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This workflow is designed to support transparent, reactive, and interpretable exploratory data analysis.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;a-paper-published-in-softwarex&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;A paper published in &lt;em&gt;SoftwareX&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;SoftwareX&lt;/em&gt; paper provides a detailed description of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the motivation and intended audience of the tool,&lt;/li&gt;
&lt;li&gt;the software architecture,&lt;/li&gt;
&lt;li&gt;the methodological choices underlying the association measures,&lt;/li&gt;
&lt;li&gt;an illustrative case study based on the European Social Survey,&lt;/li&gt;
&lt;li&gt;and perspectives for future development.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Link to the paper: &lt;a href=&#34;https://doi.org/10.1016/j.softx.2025.102483&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1016/j.softx.2025.102483&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In line with the journal’s standards, the code, documentation, and example data are fully open and reproducible.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;the-r-package-is-also-on-cran&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;The R package is also on CRAN&lt;/h2&gt;
&lt;p&gt;Alongside the paper, an R package is also available on CRAN, making installation and use straightforward:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;AssociationExplorer2&amp;quot;)
library(AssociationExplorer2)
run_associationexplorer()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The CRAN release ensures:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;standardized installation,&lt;/li&gt;
&lt;li&gt;better integration with existing R workflows,&lt;/li&gt;
&lt;li&gt;clearer versioning and dependency management.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;who-is-it-for-and-how-can-it-be-used&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Who is it for, and how can it be used?&lt;/h2&gt;
&lt;p&gt;AssociationExplorer is particularly useful for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;exploratory analysis prior to formal modeling,&lt;/li&gt;
&lt;li&gt;teaching concepts related to association and dependence,&lt;/li&gt;
&lt;li&gt;data storytelling and journalistic exploration,&lt;/li&gt;
&lt;li&gt;the analysis of survey data and public datasets.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is not to replace confirmatory statistical analyses, but to provide a robust tool for understanding the structure of the data before modeling.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;acknowledgements&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;This work was carried out in collaboration with Cédric Heuchenne, Arnaud Claes, and Antonin Descampe, whom I warmly thank.&lt;/p&gt;
&lt;p&gt;The project is supported by the Walloon Region and SPW Recherche within the ODALON research project.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;useful-links&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Useful links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;📄 &lt;em&gt;SoftwareX&lt;/em&gt; paper: &lt;a href=&#34;https://doi.org/10.1016/j.softx.2025.102483&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1016/j.softx.2025.102483&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;📦 CRAN package: &lt;a href=&#34;https://CRAN.R-project.org/package=AssociationExplorer2&#34; class=&#34;uri&#34;&gt;https://CRAN.R-project.org/package=AssociationExplorer2&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;💻 GitHub repository:
&lt;ul&gt;
&lt;li&gt;of the &lt;a href=&#34;https://github.com/AntoineSoetewey/AssociationExplorer&#34;&gt;paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;of the &lt;a href=&#34;https://github.com/AntoineSoetewey/AssociationExplorer2&#34;&gt;R package&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As always, feedback, bug reports, and suggestions are very welcome.&lt;/p&gt;
&lt;p&gt;Thanks for reading!&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Soetewey, A., Heuchenne, C., Claes, A. and Descampe, A. (2026). AssociationExplorer: A user-friendly shiny application for exploring associations and visual patterns. &lt;em&gt;SoftwareX, 33&lt;/em&gt;(102483). &lt;a href=&#34;https://doi.org/10.1016/j.softx.2025.102483&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1016/j.softx.2025.102483&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Soetewey, A., Heuchenne, C., Claes, A. and Descampe, A. (2025). AssociationExplorer2: A User-Friendly ‘shiny’ Application for Exploring Associations and Visual Patterns. R package version 0.1.4, &lt;a href=&#34;https://github.com/AntoineSoetewey/AssociationExplorer2&#34; class=&#34;uri&#34;&gt;https://github.com/AntoineSoetewey/AssociationExplorer2&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Nonparametric serial interval estimation</title>
      <link>https://statsandr.com/blog/nonparametric-serial-interval-estimation/</link>
      <pubDate>Mon, 18 Aug 2025 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/nonparametric-serial-interval-estimation/</guid>
      <description>


&lt;div id=&#34;motivation&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Motivation&lt;/h2&gt;
&lt;p&gt;Epidemiological delays inform about the time between two well-defined events related to a disease. The serial interval (SI) of an infectious disease is defined as the time between symptom onset in a primary case (infector) and symptom onset in a secondary case (infectee). It is a widely used epidemiological delay quantity and plays a central role in mathematical/statistical models of disease transmission. There exists a tight link between the reproduction number (average number of secondary infections generated by an infected individual) and the serial interval. Therefore, getting accurate knowledge about the SI distribution is key to gain a clear understanding of transmission dynamics during outbreaks. Timings of symptom onset for infector-infectee pairs can be obtained from line list data and observations usually consist of calendar dates. From a mathematical perspective, it is more convenient to work with numbers than with calendar dates and the latter are typically transformed to integers for the sake of statistical analysis.&lt;/p&gt;
&lt;p&gt;The main challenge when working with SI data is censoring in the sense that exact symptom onset times are usually unobserved and only known to have occurred between two time points. If the time resolution of a reported timing of illness onset is a calendar day, for instance July 15, there is not enough information to determine the exact time of illness onset within that day. As such, symptom onset is assumed to have occurred between July 15 and July 16 and we say that serial interval data are interval-censored. The figure below illustrates the coarse structure of SI data that adds a layer of complexity to the estimation problem.&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;images/SIcoarse.PNG&#34; style=&#34;width:100.0%&#34; alt=&#34;Source: Gressani O, Hens N. (2025). Nonparametric serial interval estimation with uniform mixtures. PLoS Comput Biol 21(8): e1013338.&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Source: Gressani O, Hens N. (2025). Nonparametric serial interval estimation with uniform mixtures. PLoS Comput Biol 21(8): e1013338.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;A recent article by &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1013338&#34;&gt;Gressani and Hens (2025)&lt;/a&gt; published in PLOS Computational Biology proposes a new estimator of the cumulative distribution function of the serial interval without making parametric assumptions regarding the underlying SI distribution. The estimator is based on mixtures of uniform distributions and only requires left and right bounds of serial interval windows of infector-infectee pairs as a main input (&lt;span class=&#34;math inline&#34;&gt;\(s_{iL}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(s_{iR}\)&lt;/span&gt; in the above figure). Point estimates of different serial interval features are available in closed-form and the bootstrap is used to compute confidence intervals. The nonparametric methodology is relatively simple and computationally fast and stable. Moreover, a user-friendly routine is available in the &lt;a href=&#34;https://github.com/oswaldogressani/EpiDelays&#34;&gt;EpiDelays package&lt;/a&gt; written in R. This post aims at giving users a simple first experience with this new nonparametric methodology for serial interval estimation. The package can be installed from GitHub (using devtools) as follows:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;devtools&amp;quot;)
devtools::install_github(&amp;quot;oswaldogressani/EpiDelays&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;simulated-data&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Simulated data&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;estimSI()&lt;/code&gt; routine of the EpiDelays package can be used to compute nonparametric estimates (point estimates with standard errors and confidence intervals) of different serial interval features (e.g. the mean, median, standard deviation). The routine is simple to use and requires only two inputs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;x&lt;/code&gt;: A data frame with &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; rows (corresponding to the number of transmission pairs for which illness onset data is available) and two columns containing the lower bound of the SI window &lt;span class=&#34;math inline&#34;&gt;\(s_{iL}\)&lt;/span&gt; (first column) and the upper bound of the SI window &lt;span class=&#34;math inline&#34;&gt;\(s_{iR}\)&lt;/span&gt; (second column).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;nboot&lt;/code&gt;: An integer for the bootstrap sample size (default is 2000) used to construct (&lt;span class=&#34;math inline&#34;&gt;\(90\%\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(95\%\)&lt;/span&gt;) confidence intervals (CIs).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We start by illustrating the use of &lt;code&gt;estimSI()&lt;/code&gt; on simulated data. The &lt;code&gt;simSI()&lt;/code&gt; routine can be used to simulate artificial serial interval data with SI windows having a width (coarseness) of at least two days. The underlying target SI distribution is assumed to have a Gaussian distribution with mean &lt;code&gt;muS&lt;/code&gt; and standard deviation &lt;code&gt;sdS&lt;/code&gt; that have to be specified by the user. The code below can be used to generate &lt;span class=&#34;math inline&#34;&gt;\(n=15\)&lt;/span&gt; SI windows from a Gaussian distribution with a mean of &lt;span class=&#34;math inline&#34;&gt;\(3\)&lt;/span&gt; days and standard deviation of &lt;span class=&#34;math inline&#34;&gt;\(2\)&lt;/span&gt; days. More details regarding the data generating mechanism can be found in the &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1013338&#34;&gt;article&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;set.seed(2025)
simdata &amp;lt;- simSI(muS = 3, sdS = 2, n = 15)
gt::gt(round(simdata, 2))&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;kwsipvprqq&#34; style=&#34;padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;&#34;&gt;
&lt;style&gt;#kwsipvprqq table {
  font-family: system-ui, &#39;Segoe UI&#39;, Roboto, Helvetica, Arial, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#kwsipvprqq thead, #kwsipvprqq tbody, #kwsipvprqq tfoot, #kwsipvprqq tr, #kwsipvprqq td, #kwsipvprqq th {
  border-style: none;
}

#kwsipvprqq p {
  margin: 0;
  padding: 0;
}

#kwsipvprqq .gt_table {
  display: table;
  border-collapse: collapse;
  line-height: normal;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  background-color: #FFFFFF;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

#kwsipvprqq .gt_caption {
  padding-top: 4px;
  padding-bottom: 4px;
}

#kwsipvprqq .gt_title {
  color: #333333;
  font-size: 125%;
  font-weight: initial;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-color: #FFFFFF;
  border-bottom-width: 0;
}

#kwsipvprqq .gt_subtitle {
  color: #333333;
  font-size: 85%;
  font-weight: initial;
  padding-top: 3px;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-color: #FFFFFF;
  border-top-width: 0;
}

#kwsipvprqq .gt_heading {
  background-color: #FFFFFF;
  text-align: center;
  border-bottom-color: #FFFFFF;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#kwsipvprqq .gt_bottom_border {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kwsipvprqq .gt_col_headings {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#kwsipvprqq .gt_col_heading {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
  padding-right: 5px;
  overflow-x: hidden;
}

#kwsipvprqq .gt_column_spanner_outer {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 4px;
}

#kwsipvprqq .gt_column_spanner_outer:first-child {
  padding-left: 0;
}

#kwsipvprqq .gt_column_spanner_outer:last-child {
  padding-right: 0;
}

#kwsipvprqq .gt_column_spanner {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow-x: hidden;
  display: inline-block;
  width: 100%;
}

#kwsipvprqq .gt_spanner_row {
  border-bottom-style: hidden;
}

#kwsipvprqq .gt_group_heading {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  text-align: left;
}

#kwsipvprqq .gt_empty_group_heading {
  padding: 0.5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: middle;
}

#kwsipvprqq .gt_from_md &gt; :first-child {
  margin-top: 0;
}

#kwsipvprqq .gt_from_md &gt; :last-child {
  margin-bottom: 0;
}

#kwsipvprqq .gt_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 10px;
  border-top-style: solid;
  border-top-width: 1px;
  border-top-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  overflow-x: hidden;
}

#kwsipvprqq .gt_stub {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
}

#kwsipvprqq .gt_stub_row_group {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: top;
}

#kwsipvprqq .gt_row_group_first td {
  border-top-width: 2px;
}

#kwsipvprqq .gt_row_group_first th {
  border-top-width: 2px;
}

#kwsipvprqq .gt_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#kwsipvprqq .gt_first_summary_row {
  border-top-style: solid;
  border-top-color: #D3D3D3;
}

#kwsipvprqq .gt_first_summary_row.thick {
  border-top-width: 2px;
}

#kwsipvprqq .gt_last_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kwsipvprqq .gt_grand_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#kwsipvprqq .gt_first_grand_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-style: double;
  border-top-width: 6px;
  border-top-color: #D3D3D3;
}

#kwsipvprqq .gt_last_grand_summary_row_top {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: double;
  border-bottom-width: 6px;
  border-bottom-color: #D3D3D3;
}

#kwsipvprqq .gt_striped {
  background-color: rgba(128, 128, 128, 0.05);
}

#kwsipvprqq .gt_table_body {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kwsipvprqq .gt_footnotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#kwsipvprqq .gt_footnote {
  margin: 0px;
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#kwsipvprqq .gt_sourcenotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#kwsipvprqq .gt_sourcenote {
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#kwsipvprqq .gt_left {
  text-align: left;
}

#kwsipvprqq .gt_center {
  text-align: center;
}

#kwsipvprqq .gt_right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#kwsipvprqq .gt_font_normal {
  font-weight: normal;
}

#kwsipvprqq .gt_font_bold {
  font-weight: bold;
}

#kwsipvprqq .gt_font_italic {
  font-style: italic;
}

#kwsipvprqq .gt_super {
  font-size: 65%;
}

#kwsipvprqq .gt_footnote_marks {
  font-size: 75%;
  vertical-align: 0.4em;
  position: initial;
}

#kwsipvprqq .gt_asterisk {
  font-size: 100%;
  vertical-align: 0;
}

#kwsipvprqq .gt_indent_1 {
  text-indent: 5px;
}

#kwsipvprqq .gt_indent_2 {
  text-indent: 10px;
}

#kwsipvprqq .gt_indent_3 {
  text-indent: 15px;
}

#kwsipvprqq .gt_indent_4 {
  text-indent: 20px;
}

#kwsipvprqq .gt_indent_5 {
  text-indent: 25px;
}

#kwsipvprqq .katex-display {
  display: inline-flex !important;
  margin-bottom: 0.75em !important;
}

#kwsipvprqq div.Reactable &gt; div.rt-table &gt; div.rt-thead &gt; div.rt-tr.rt-tr-group-header &gt; div.rt-th-group:after {
  height: 0px !important;
}
&lt;/style&gt;
&lt;table class=&#34;gt_table&#34; data-quarto-disable-processing=&#34;false&#34; data-quarto-bootstrap=&#34;false&#34;&gt;
  &lt;thead&gt;
    &lt;tr class=&#34;gt_col_headings&#34;&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;s&#34;&gt;s&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;sl&#34;&gt;sl&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;sr&#34;&gt;sr&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;sw&#34;&gt;sw&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody class=&#34;gt_table_body&#34;&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;4.24&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;3.07&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;4.55&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;6&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;5.54&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;7&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;3.74&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;2.67&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;3.79&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;2.84&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;2.31&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;1&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;4.40&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;6&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;2.21&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;1&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;-0.51&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;-2&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;1&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;2.16&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;1&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;4.53&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;2&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;5&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;s&#34; class=&#34;gt_row gt_right&#34;&gt;5.13&lt;/td&gt;
&lt;td headers=&#34;sl&#34; class=&#34;gt_row gt_right&#34;&gt;3&lt;/td&gt;
&lt;td headers=&#34;sr&#34; class=&#34;gt_row gt_right&#34;&gt;7&lt;/td&gt;
&lt;td headers=&#34;sw&#34; class=&#34;gt_row gt_right&#34;&gt;4&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  
  
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;The first column of the simulated dataset contains the true (unobserved) serial interval value generated from the chosen Gaussian distribution. The second and third columns contain the left and right bound of the SI window (&lt;code&gt;sl&lt;/code&gt; and &lt;code&gt;sr&lt;/code&gt;). Finally, the last column contains the width of the observed SI window, i.e. &lt;code&gt;sw=sr-sl&lt;/code&gt;. The underlying target SI distribution is specified to be Gaussian with a mean of &lt;span class=&#34;math inline&#34;&gt;\(3\)&lt;/span&gt; days and standard deviation of &lt;span class=&#34;math inline&#34;&gt;\(2\)&lt;/span&gt; days. The 5th, 25th, 75th and 95th quantiles of the latter distribution are:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;round(qnorm(p = c(0.05, 0.25, 0.75, 0.95), mean = 3, sd = 2), 1)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] -0.3  1.7  4.3  6.3&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We now create a data frame containing &lt;code&gt;sl&lt;/code&gt; and &lt;code&gt;sr&lt;/code&gt; and use the latter as an input in the &lt;code&gt;estimSI()&lt;/code&gt; routine. Nonparametric estimates of different SI features can be accessed with &lt;code&gt;$npestim$&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;xdf &amp;lt;- data.frame(sl = simdata$sl, sr = simdata$sr)
SIfit &amp;lt;- estimSI(x = xdf, nboot = 2000)
gt::gt(round(SIfit$npestim, 1),
  rownames_to_stub = TRUE
)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;aomvniacfb&#34; style=&#34;padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;&#34;&gt;
&lt;style&gt;#aomvniacfb table {
  font-family: system-ui, &#39;Segoe UI&#39;, Roboto, Helvetica, Arial, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#aomvniacfb thead, #aomvniacfb tbody, #aomvniacfb tfoot, #aomvniacfb tr, #aomvniacfb td, #aomvniacfb th {
  border-style: none;
}

#aomvniacfb p {
  margin: 0;
  padding: 0;
}

#aomvniacfb .gt_table {
  display: table;
  border-collapse: collapse;
  line-height: normal;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  background-color: #FFFFFF;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

#aomvniacfb .gt_caption {
  padding-top: 4px;
  padding-bottom: 4px;
}

#aomvniacfb .gt_title {
  color: #333333;
  font-size: 125%;
  font-weight: initial;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-color: #FFFFFF;
  border-bottom-width: 0;
}

#aomvniacfb .gt_subtitle {
  color: #333333;
  font-size: 85%;
  font-weight: initial;
  padding-top: 3px;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-color: #FFFFFF;
  border-top-width: 0;
}

#aomvniacfb .gt_heading {
  background-color: #FFFFFF;
  text-align: center;
  border-bottom-color: #FFFFFF;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#aomvniacfb .gt_bottom_border {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aomvniacfb .gt_col_headings {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#aomvniacfb .gt_col_heading {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
  padding-right: 5px;
  overflow-x: hidden;
}

#aomvniacfb .gt_column_spanner_outer {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 4px;
}

#aomvniacfb .gt_column_spanner_outer:first-child {
  padding-left: 0;
}

#aomvniacfb .gt_column_spanner_outer:last-child {
  padding-right: 0;
}

#aomvniacfb .gt_column_spanner {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow-x: hidden;
  display: inline-block;
  width: 100%;
}

#aomvniacfb .gt_spanner_row {
  border-bottom-style: hidden;
}

#aomvniacfb .gt_group_heading {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  text-align: left;
}

#aomvniacfb .gt_empty_group_heading {
  padding: 0.5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: middle;
}

#aomvniacfb .gt_from_md &gt; :first-child {
  margin-top: 0;
}

#aomvniacfb .gt_from_md &gt; :last-child {
  margin-bottom: 0;
}

#aomvniacfb .gt_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 10px;
  border-top-style: solid;
  border-top-width: 1px;
  border-top-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  overflow-x: hidden;
}

#aomvniacfb .gt_stub {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
}

#aomvniacfb .gt_stub_row_group {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: top;
}

#aomvniacfb .gt_row_group_first td {
  border-top-width: 2px;
}

#aomvniacfb .gt_row_group_first th {
  border-top-width: 2px;
}

#aomvniacfb .gt_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#aomvniacfb .gt_first_summary_row {
  border-top-style: solid;
  border-top-color: #D3D3D3;
}

#aomvniacfb .gt_first_summary_row.thick {
  border-top-width: 2px;
}

#aomvniacfb .gt_last_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aomvniacfb .gt_grand_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#aomvniacfb .gt_first_grand_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-style: double;
  border-top-width: 6px;
  border-top-color: #D3D3D3;
}

#aomvniacfb .gt_last_grand_summary_row_top {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: double;
  border-bottom-width: 6px;
  border-bottom-color: #D3D3D3;
}

#aomvniacfb .gt_striped {
  background-color: rgba(128, 128, 128, 0.05);
}

#aomvniacfb .gt_table_body {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aomvniacfb .gt_footnotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#aomvniacfb .gt_footnote {
  margin: 0px;
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#aomvniacfb .gt_sourcenotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#aomvniacfb .gt_sourcenote {
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#aomvniacfb .gt_left {
  text-align: left;
}

#aomvniacfb .gt_center {
  text-align: center;
}

#aomvniacfb .gt_right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#aomvniacfb .gt_font_normal {
  font-weight: normal;
}

#aomvniacfb .gt_font_bold {
  font-weight: bold;
}

#aomvniacfb .gt_font_italic {
  font-style: italic;
}

#aomvniacfb .gt_super {
  font-size: 65%;
}

#aomvniacfb .gt_footnote_marks {
  font-size: 75%;
  vertical-align: 0.4em;
  position: initial;
}

#aomvniacfb .gt_asterisk {
  font-size: 100%;
  vertical-align: 0;
}

#aomvniacfb .gt_indent_1 {
  text-indent: 5px;
}

#aomvniacfb .gt_indent_2 {
  text-indent: 10px;
}

#aomvniacfb .gt_indent_3 {
  text-indent: 15px;
}

#aomvniacfb .gt_indent_4 {
  text-indent: 20px;
}

#aomvniacfb .gt_indent_5 {
  text-indent: 25px;
}

#aomvniacfb .katex-display {
  display: inline-flex !important;
  margin-bottom: 0.75em !important;
}

#aomvniacfb div.Reactable &gt; div.rt-table &gt; div.rt-thead &gt; div.rt-tr.rt-tr-group-header &gt; div.rt-th-group:after {
  height: 0px !important;
}
&lt;/style&gt;
&lt;table class=&#34;gt_table&#34; data-quarto-disable-processing=&#34;false&#34; data-quarto-bootstrap=&#34;false&#34;&gt;
  &lt;thead&gt;
    &lt;tr class=&#34;gt_col_headings&#34;&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_left&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;a::stub&#34;&gt;&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;mean&#34;&gt;mean&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;sd&#34;&gt;sd&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.05&#34;&gt;q0.05&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.25&#34;&gt;q0.25&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.5&#34;&gt;q0.5&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.75&#34;&gt;q0.75&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.95&#34;&gt;q0.95&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody class=&#34;gt_table_body&#34;&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_1&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;point&lt;/th&gt;
&lt;td headers=&#34;stub_1_1 mean&#34; class=&#34;gt_row gt_right&#34;&gt;3.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;0.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;2.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;3.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;4.6&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;6.0&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_2&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;se&lt;/th&gt;
&lt;td headers=&#34;stub_1_2 mean&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 sd&#34; class=&#34;gt_row gt_right&#34;&gt;0.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;0.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;0.5&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_3&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci90l&lt;/th&gt;
&lt;td headers=&#34;stub_1_3 mean&#34; class=&#34;gt_row gt_right&#34;&gt;2.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;-1.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;1.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;2.9&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;3.9&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;5.0&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_4&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci90r&lt;/th&gt;
&lt;td headers=&#34;stub_1_4 mean&#34; class=&#34;gt_row gt_right&#34;&gt;4.0&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 sd&#34; class=&#34;gt_row gt_right&#34;&gt;2.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;2.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;3.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;4.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;5.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;6.6&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_5&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci95l&lt;/th&gt;
&lt;td headers=&#34;stub_1_5 mean&#34; class=&#34;gt_row gt_right&#34;&gt;2.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;-1.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;1.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;2.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;3.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;4.9&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_6&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci95r&lt;/th&gt;
&lt;td headers=&#34;stub_1_6 mean&#34; class=&#34;gt_row gt_right&#34;&gt;4.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 sd&#34; class=&#34;gt_row gt_right&#34;&gt;2.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;2.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;3.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;4.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;5.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;6.6&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  
  
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;The output shows point estimates (point), standard errors (se) and confidence intervals bounds (ci) for the serial interval mean, standard deviation (sd) and 5th, 25th, 50th, 75th and 95th quantiles denoted by q0.05, q0.25, etc. We can also plot the estimated cumulative distribution function (cdf) obtained with the nonparametric approach and compare it with the target Gaussian cdf. The quality of the fit will typically depend on the sample size &lt;span class=&#34;math inline&#34;&gt;\(n\)&lt;/span&gt; and on the degree of coarseness present in the data. Note that the nonparametric methodology naturally deals with negative SI values.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;sl &amp;lt;- simdata$sl
sr &amp;lt;- simdata$sr
Fhat &amp;lt;- function(s) (1 / SIfit$n) * sum((s - sl) / (sr - sl) * (s &amp;gt;= sl &amp;amp; s &amp;lt;= sr) + (s &amp;gt; sr))
sf &amp;lt;- seq(-3, 8, length = 100)
plot(sf, sapply(sf, Fhat), type = &amp;quot;l&amp;quot;, lwd = 2, xlab = &amp;quot;Serial interval&amp;quot;, ylab = &amp;quot;cdf&amp;quot;)
grid()
lines(sf, pnorm(sf, mean = 3, sd = 2), col = &amp;quot;blue&amp;quot;, lwd = 2)
legend(&amp;quot;topleft&amp;quot;, c(&amp;quot;Estimated cdf of SI&amp;quot;, &amp;quot;Target cdf of SI&amp;quot;), col = c(&amp;quot;black&amp;quot;, &amp;quot;blue&amp;quot;), lwd = c(2, 2), bty = &amp;quot;n&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/nonparametric-serial-interval-estimation/index_files/figure-html/comparecdfs-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;real-data&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Real data&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://www.nejm.org/doi/full/10.1056/NEJMoa0906089&#34;&gt;Lessler et al. (2009)&lt;/a&gt; share a dataset containing serial interval windows obtained from &lt;span class=&#34;math inline&#34;&gt;\(n=16\)&lt;/span&gt; infector-infectee pairs for Influenza A (2009 H1N1 influenza) at a New York City school. The SI windows are directly available from the supplementary appendix of the latter reference and are encoded in a data frame &lt;code&gt;xNY&lt;/code&gt;. Nonparametric estimates of serial interval features are then obtained with &lt;code&gt;estimSI()&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;xNY &amp;lt;- data.frame(sl = c(1, 1, 1, 0, 0, 4, 2, 3, 0, 3, 0, 3, 4, 1, 3, 3), sr = c(3, 3, 3, 2, 2, 6, 4, 5, 2, 5, 2, 5, 6, 3, 5, 5))
set.seed(123)
SIfitNY &amp;lt;- estimSI(xNY, nboot = 2000)
gt::gt(round(SIfitNY$npestim, 1),
  rownames_to_stub = TRUE
)&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;lkmlioxfax&#34; style=&#34;padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;&#34;&gt;
&lt;style&gt;#lkmlioxfax table {
  font-family: system-ui, &#39;Segoe UI&#39;, Roboto, Helvetica, Arial, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#lkmlioxfax thead, #lkmlioxfax tbody, #lkmlioxfax tfoot, #lkmlioxfax tr, #lkmlioxfax td, #lkmlioxfax th {
  border-style: none;
}

#lkmlioxfax p {
  margin: 0;
  padding: 0;
}

#lkmlioxfax .gt_table {
  display: table;
  border-collapse: collapse;
  line-height: normal;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  background-color: #FFFFFF;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

#lkmlioxfax .gt_caption {
  padding-top: 4px;
  padding-bottom: 4px;
}

#lkmlioxfax .gt_title {
  color: #333333;
  font-size: 125%;
  font-weight: initial;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-color: #FFFFFF;
  border-bottom-width: 0;
}

#lkmlioxfax .gt_subtitle {
  color: #333333;
  font-size: 85%;
  font-weight: initial;
  padding-top: 3px;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-color: #FFFFFF;
  border-top-width: 0;
}

#lkmlioxfax .gt_heading {
  background-color: #FFFFFF;
  text-align: center;
  border-bottom-color: #FFFFFF;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#lkmlioxfax .gt_bottom_border {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#lkmlioxfax .gt_col_headings {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#lkmlioxfax .gt_col_heading {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
  padding-right: 5px;
  overflow-x: hidden;
}

#lkmlioxfax .gt_column_spanner_outer {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 4px;
}

#lkmlioxfax .gt_column_spanner_outer:first-child {
  padding-left: 0;
}

#lkmlioxfax .gt_column_spanner_outer:last-child {
  padding-right: 0;
}

#lkmlioxfax .gt_column_spanner {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow-x: hidden;
  display: inline-block;
  width: 100%;
}

#lkmlioxfax .gt_spanner_row {
  border-bottom-style: hidden;
}

#lkmlioxfax .gt_group_heading {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  text-align: left;
}

#lkmlioxfax .gt_empty_group_heading {
  padding: 0.5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: middle;
}

#lkmlioxfax .gt_from_md &gt; :first-child {
  margin-top: 0;
}

#lkmlioxfax .gt_from_md &gt; :last-child {
  margin-bottom: 0;
}

#lkmlioxfax .gt_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 10px;
  border-top-style: solid;
  border-top-width: 1px;
  border-top-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  overflow-x: hidden;
}

#lkmlioxfax .gt_stub {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
}

#lkmlioxfax .gt_stub_row_group {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: top;
}

#lkmlioxfax .gt_row_group_first td {
  border-top-width: 2px;
}

#lkmlioxfax .gt_row_group_first th {
  border-top-width: 2px;
}

#lkmlioxfax .gt_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#lkmlioxfax .gt_first_summary_row {
  border-top-style: solid;
  border-top-color: #D3D3D3;
}

#lkmlioxfax .gt_first_summary_row.thick {
  border-top-width: 2px;
}

#lkmlioxfax .gt_last_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#lkmlioxfax .gt_grand_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#lkmlioxfax .gt_first_grand_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-style: double;
  border-top-width: 6px;
  border-top-color: #D3D3D3;
}

#lkmlioxfax .gt_last_grand_summary_row_top {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: double;
  border-bottom-width: 6px;
  border-bottom-color: #D3D3D3;
}

#lkmlioxfax .gt_striped {
  background-color: rgba(128, 128, 128, 0.05);
}

#lkmlioxfax .gt_table_body {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#lkmlioxfax .gt_footnotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#lkmlioxfax .gt_footnote {
  margin: 0px;
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#lkmlioxfax .gt_sourcenotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#lkmlioxfax .gt_sourcenote {
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#lkmlioxfax .gt_left {
  text-align: left;
}

#lkmlioxfax .gt_center {
  text-align: center;
}

#lkmlioxfax .gt_right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#lkmlioxfax .gt_font_normal {
  font-weight: normal;
}

#lkmlioxfax .gt_font_bold {
  font-weight: bold;
}

#lkmlioxfax .gt_font_italic {
  font-style: italic;
}

#lkmlioxfax .gt_super {
  font-size: 65%;
}

#lkmlioxfax .gt_footnote_marks {
  font-size: 75%;
  vertical-align: 0.4em;
  position: initial;
}

#lkmlioxfax .gt_asterisk {
  font-size: 100%;
  vertical-align: 0;
}

#lkmlioxfax .gt_indent_1 {
  text-indent: 5px;
}

#lkmlioxfax .gt_indent_2 {
  text-indent: 10px;
}

#lkmlioxfax .gt_indent_3 {
  text-indent: 15px;
}

#lkmlioxfax .gt_indent_4 {
  text-indent: 20px;
}

#lkmlioxfax .gt_indent_5 {
  text-indent: 25px;
}

#lkmlioxfax .katex-display {
  display: inline-flex !important;
  margin-bottom: 0.75em !important;
}

#lkmlioxfax div.Reactable &gt; div.rt-table &gt; div.rt-thead &gt; div.rt-tr.rt-tr-group-header &gt; div.rt-th-group:after {
  height: 0px !important;
}
&lt;/style&gt;
&lt;table class=&#34;gt_table&#34; data-quarto-disable-processing=&#34;false&#34; data-quarto-bootstrap=&#34;false&#34;&gt;
  &lt;thead&gt;
    &lt;tr class=&#34;gt_col_headings&#34;&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_left&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;a::stub&#34;&gt;&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;mean&#34;&gt;mean&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;sd&#34;&gt;sd&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.05&#34;&gt;q0.05&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.25&#34;&gt;q0.25&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.5&#34;&gt;q0.5&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.75&#34;&gt;q0.75&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;q0.95&#34;&gt;q0.95&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody class=&#34;gt_table_body&#34;&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_1&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;point&lt;/th&gt;
&lt;td headers=&#34;stub_1_1 mean&#34; class=&#34;gt_row gt_right&#34;&gt;2.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;1.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;2.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;4.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_1 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;5.2&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_2&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;se&lt;/th&gt;
&lt;td headers=&#34;stub_1_2 mean&#34; class=&#34;gt_row gt_right&#34;&gt;0.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 sd&#34; class=&#34;gt_row gt_right&#34;&gt;0.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;0.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;0.6&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;0.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_2 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;0.3&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_3&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci90l&lt;/th&gt;
&lt;td headers=&#34;stub_1_3 mean&#34; class=&#34;gt_row gt_right&#34;&gt;2.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.3&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;0.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;1.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;3.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_3 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;4.7&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_4&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci90r&lt;/th&gt;
&lt;td headers=&#34;stub_1_4 mean&#34; class=&#34;gt_row gt_right&#34;&gt;3.4&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;2.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;3.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;4.6&lt;/td&gt;
&lt;td headers=&#34;stub_1_4 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;5.6&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_5&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci95l&lt;/th&gt;
&lt;td headers=&#34;stub_1_5 mean&#34; class=&#34;gt_row gt_right&#34;&gt;2.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;0.2&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;1.0&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;1.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;3.0&lt;/td&gt;
&lt;td headers=&#34;stub_1_5 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;4.6&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;th id=&#34;stub_1_6&#34; scope=&#34;row&#34; class=&#34;gt_row gt_left gt_stub&#34;&gt;ci95r&lt;/th&gt;
&lt;td headers=&#34;stub_1_6 mean&#34; class=&#34;gt_row gt_right&#34;&gt;3.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 sd&#34; class=&#34;gt_row gt_right&#34;&gt;1.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.05&#34; class=&#34;gt_row gt_right&#34;&gt;1.1&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.25&#34; class=&#34;gt_row gt_right&#34;&gt;2.5&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.5&#34; class=&#34;gt_row gt_right&#34;&gt;3.8&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.75&#34; class=&#34;gt_row gt_right&#34;&gt;4.7&lt;/td&gt;
&lt;td headers=&#34;stub_1_6 q0.95&#34; class=&#34;gt_row gt_right&#34;&gt;5.7&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  
  
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Interested readers can find more real data examples in &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1013338&#34;&gt;Gressani and Hens (2025)&lt;/a&gt; and learn about the strengths and limitations of this new nonparametric methodology for serial interval estimation.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;p&gt;Gressani, O. and Hens, N. (2025). Nonparametric serial interval estimation with uniform mixtures.
&lt;em&gt;PLoS Computational Biology&lt;/em&gt; &lt;strong&gt;21&lt;/strong&gt;(8):e101338. &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1013338&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1371/journal.pcbi.1013338&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Gressani; O. (2025). EpiDelays: A Software for Estimation of Epidemiological Delays (version 0.0.1). &lt;a href=&#34;https://github.com/oswaldogressani/EpiDelays&#34; class=&#34;uri&#34;&gt;https://github.com/oswaldogressani/EpiDelays&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lessler, J., Reich, N. G., Cummings, D. A., and the New York City Department of Health and Mental Hygiene Swine Influenza Investigation Team. (2009). Outbreak of 2009 pandemic influenza A (H1N1) at a New York City school. &lt;em&gt;New England Journal of Medicine&lt;/em&gt; &lt;strong&gt;361&lt;/strong&gt;(27), 2628-2636. &lt;a href=&#34;https://www.nejm.org/doi/full/10.1056/NEJMoa0906089&#34; class=&#34;uri&#34;&gt;https://www.nejm.org/doi/full/10.1056/NEJMoa0906089&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Semi-Markov modeling for disease incidence risk and duration&#39;</title>
      <link>https://statsandr.com/blog/paper-semi-markov-modeling-for-disease-incidence-risk-and-duration/</link>
      <pubDate>Mon, 16 Jun 2025 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-semi-markov-modeling-for-disease-incidence-risk-and-duration/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/paper-semi-markov-modeling-for-disease-incidence-risk-and-duration.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I’m happy to share that my latest research paper, &lt;em&gt;“Semi-Markov modeling for disease incidence risk and duration”&lt;/em&gt; has been accepted for publication in the journal Biostatistics &amp;amp; Epidemiology &lt;a href=&#34;https://doi.org/10.1080/24709360.2025.2517916&#34;&gt;(Soetewey et al., 2025)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the full paper &lt;a href=&#34;https://doi.org/10.1080/24709360.2025.2517916&#34;&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;This work focuses on the use of a &lt;strong&gt;Semi-Markov illness-death model&lt;/strong&gt; to estimate both:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The risk of cancer incidence&lt;/strong&gt; over a future time period&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The number of years of life lost (YLL)&lt;/strong&gt; due to cancer, with a focus on loss before age 70&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The analysis relies on real-world data from the &lt;strong&gt;Belgian Cancer Registry&lt;/strong&gt;, covering over 160,000 cases of melanoma, thyroid, and female breast cancer diagnosed between 2004 and 2020. By modeling transitions between “healthy,” “ill,” and “dead” states, we provide a comprehensive framework to better understand disease burden over time, not just at diagnosis, but also for long-term survivors.&lt;/p&gt;
&lt;p&gt;One key feature of this work is its application to &lt;strong&gt;non-homogeneous Semi-Markov processes&lt;/strong&gt;, allowing us to account for the time since diagnosis when estimating survival and life expectancy. This adds a clinically meaningful dynamic dimension to traditional multi-state models.&lt;/p&gt;
&lt;p&gt;Beyond its methodological contributions, this study has important implications for &lt;strong&gt;public health&lt;/strong&gt; and &lt;strong&gt;insurance regulation&lt;/strong&gt;. In particular, the results offer quantitative support for the &lt;strong&gt;right to be forgotten&lt;/strong&gt;; a legal provision that allows cancer survivors to apply for credit or insurance products without being penalized once they’ve reached a certain number of years since the end of treatment.&lt;/p&gt;
&lt;p&gt;Our results suggest that, for many patients who survive 10 years post-diagnosis, the expected loss in life years compared to the general population becomes minimal, sometimes even below one year. This is especially true for cancers like melanoma and thyroid cancer. These findings could contribute to more equitable and evidence-based insurance underwriting practices.&lt;/p&gt;
&lt;p&gt;This research was a collaborative effort, and I would like to express my sincere thanks to my former PhD supervisors, Catherine Legrand, Michel Denuit (UCLouvain) and Geert Silversmit (Belgian Cancer Registry), for their invaluable guidance and support throughout the project.&lt;/p&gt;
&lt;p&gt;Thanks for reading!&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Soetewey, A., Legrand, C., Denuit, M., &amp;amp; Silversmit, G. (2025). Semi-Markov modeling for disease incidence risk and duration. &lt;em&gt;Biostatistics &amp;amp; Epidemiology, 9&lt;/em&gt;(1). &lt;a href=&#34;https://doi.org/10.1080/24709360.2025.2517916&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1080/24709360.2025.2517916&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Right to be forgotten for mortgage insurance issued to cancer survivors: critical assessment and new proposal&#39;</title>
      <link>https://statsandr.com/blog/paper-right-to-be-forgotten-for-mortgage-insurance-issued-to-cancer-survivors-critical-assessment-and-new-proposal/</link>
      <pubDate>Tue, 05 Nov 2024 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-right-to-be-forgotten-for-mortgage-insurance-issued-to-cancer-survivors-critical-assessment-and-new-proposal/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/paper-right-to-be-forgotten-for-mortgage-insurance-issued-to-cancer-survivors-critical-assessment-and-new-proposal.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to announce that our paper entitled “Right to be forgotten for mortgage insurance issued to cancer survivors: critical assessment and new proposal” has been accepted for publication in &lt;em&gt;European Actuarial Journal&lt;/em&gt; &lt;a href=&#34;https://doi.org/10.1007/s13385-024-00403-6&#34;&gt;(Soetewey et al., 2025)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this paper, we propose an alternative method to determine the waiting period opening the right to be forgotten in insurance. This new method is based on a constraint imposed to the premium, which is then transposed into a target on the conditional observed survival. Furthermore, the paper also investigates the impact of the stage of the tumor at diagnosis on waiting periods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read more &lt;a href=&#34;http://dx.doi.org/10.1007/s13385-024-00403-6&#34;&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks to all co-authors for the great work. We are also thankful to the two anonymous reviewers for their input that has greatly helped shape the paper.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;p&gt;Soetewey, A., Legrand, C., Denuit, M. et al. Right to be forgotten for mortgage insurance issued to cancer survivors: critical assessment and new proposal. &lt;em&gt;European Actuarial Journal&lt;/em&gt; &lt;strong&gt;15&lt;/strong&gt;, 15–43 (2025). &lt;a href=&#34;https://doi.org/10.1007/s13385-024-00403-6&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1007/s13385-024-00403-6&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>EpiLPS for estimation of incubation times</title>
      <link>https://statsandr.com/blog/epilps-for-estimation-of-incubation-times/</link>
      <pubDate>Thu, 01 Aug 2024 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/epilps-for-estimation-of-incubation-times/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#motivation&#34; id=&#34;toc-motivation&#34;&gt;Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#coarse-data&#34; id=&#34;toc-coarse-data&#34;&gt;Coarse data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#simulated-example&#34; id=&#34;toc-simulated-example&#34;&gt;Simulated example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#real-data-example&#34; id=&#34;toc-real-data-example&#34;&gt;Real data example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#references&#34; id=&#34;toc-references&#34;&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&#34;motivation&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Motivation&lt;/h1&gt;
&lt;p&gt;A group of researchers from the Data Science Institute (DSI) at Hasselt University developed a new statistical model to estimate the incubation period of a pathogenic organism based on coarse data. The incubation period of an infectious disease (defined as the time elapsed between infection and the manifestation of first symptoms) is of great importance as it permits to shed light on the epidemic potential of a disease and to optimize the length of quarantine periods to freeze transmission. The article &lt;a href=&#34;https://doi.org/10.1093/aje/kwae192&#34;&gt;(Gressani et al. 2024)&lt;/a&gt; was recently published in the &lt;em&gt;American Journal of Epidemiology&lt;/em&gt; with practical implementation of the methodology accessible through the &lt;a href=&#34;https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/&#34;&gt;EpiLPS package&lt;/a&gt; &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1010618&#34;&gt;(Gressani et al. 2022)&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;coarse-data&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Coarse data&lt;/h1&gt;
&lt;p&gt;What makes estimation of incubation times so challenging in the first place? The devil lies in the data. True infection times are stealthy and rarely observed. In information-theoretic jargon this phenomenon is called “imperfect information’’ but statisticians prefer to call it censoring. To be more precise, infection times are interval censored, i.e. one part of the collected data contains exposure intervals &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{E}=[t^{E_L},t^{E_R}]\)&lt;/span&gt; reported by individuals that are part of the study, where &lt;span class=&#34;math inline&#34;&gt;\(t^{E_L}\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(t^{E_R}\)&lt;/span&gt; stand for the left and right bound, respectively, of the exposure window. The other part of the data contains symptom onset times &lt;span class=&#34;math inline&#34;&gt;\(t^{\mathcal{S}}\)&lt;/span&gt;. This is a more easily accessible piece of information -people tend to remember the day when first symptoms appeared- and so the timing of symptom onset is assumed to be exactly observed. Subtracting the exposure bounds from the symptom onset time, one obtains the incubation interval &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{I}=[t^{\mathcal{I}_L}, t^{\mathcal{I}_R}]\)&lt;/span&gt; with lower bound &lt;span class=&#34;math inline&#34;&gt;\(t^{\mathcal{I}_L}=t^{\mathcal{S}}-t^{E_R}\)&lt;/span&gt; and upper bound &lt;span class=&#34;math inline&#34;&gt;\(t^{\mathcal{I}_R}=t^{\mathcal{S}}-t^{E_L}\)&lt;/span&gt;, characterizing the coarse data structure which will be the main model input.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;simulated-example&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Simulated example&lt;/h1&gt;
&lt;p&gt;In EpiLPS, the &lt;code&gt;estimIncub()&lt;/code&gt; routine is designed to compute an estimate of the incubation density based on the methodology of &lt;a href=&#34;https://doi.org/10.1093/aje/kwae192&#34;&gt;Gressani et al. (2024)&lt;/a&gt;. Giving a detailed account of the methodology would be out of scope for this blog and the reader is redirected to the article for technicalities. In a nutshell, it is a Bayesian approach making use of (penalized) B-splines, Laplace approximations and Markov chain Monte Carlo (MCMC) methods to derive a semi-parametric estimate of the incubation density. An attractive feature of the &lt;code&gt;estimIncub()&lt;/code&gt; routine for the end-user is the minimalistic input it requires to work, namely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;x&lt;/code&gt;: A data frame containing the lower and upper bound of the incubation interval.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;K&lt;/code&gt;: An integer specifying the number of B-splines to smooth the incubation density.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;niter&lt;/code&gt;: The number of MCMC samples required.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In practice, only the data frame &lt;code&gt;x&lt;/code&gt; is required as the remaining inputs are assigned default values. Computationally, the routine requires a small amount of resources as costly subroutines are coded in C++ and integrated in R via the Rcpp package. The structure of &lt;code&gt;x&lt;/code&gt; is quite simple. It should be a data frame with two columns containing the left bound &lt;span class=&#34;math inline&#34;&gt;\(t^{\mathcal{I}_L}\)&lt;/span&gt; of the incubation interval (in the first column) and the right bound &lt;span class=&#34;math inline&#34;&gt;\(t^{\mathcal{I}_R}\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Let’s start with a simple example where &lt;code&gt;x&lt;/code&gt; is simulated based on a data generating mechanism assuming a known incubation distribution. This can be achieved with the &lt;code&gt;incubsim()&lt;/code&gt; routine in EpiLPS. We choose &lt;code&gt;x&lt;/code&gt; to be generated according to a Lognormal incubation distribution with a mean of 5.5 days and a standard deviation of 2.1 days following &lt;a href=&#34;https://doi.org/10.1126/science.abb6936&#34;&gt;Ferretti et al. (2020)&lt;/a&gt;. Simulation of &lt;span class=&#34;math inline&#34;&gt;\(n=40\)&lt;/span&gt; observations with an average exposure window of 2 days is implemented as follows:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;set.seed(2024)
simdat &amp;lt;- incubsim(incubdist = &amp;quot;LogNormal&amp;quot;, n = 40, coarseness = 2)
gt(head(simdat$Dobsincub, 5))&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;kocanygkly&#34; style=&#34;padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;&#34;&gt;
&lt;style&gt;#kocanygkly table {
  font-family: system-ui, &#39;Segoe UI&#39;, Roboto, Helvetica, Arial, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#kocanygkly thead, #kocanygkly tbody, #kocanygkly tfoot, #kocanygkly tr, #kocanygkly td, #kocanygkly th {
  border-style: none;
}

#kocanygkly p {
  margin: 0;
  padding: 0;
}

#kocanygkly .gt_table {
  display: table;
  border-collapse: collapse;
  line-height: normal;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  background-color: #FFFFFF;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

#kocanygkly .gt_caption {
  padding-top: 4px;
  padding-bottom: 4px;
}

#kocanygkly .gt_title {
  color: #333333;
  font-size: 125%;
  font-weight: initial;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-color: #FFFFFF;
  border-bottom-width: 0;
}

#kocanygkly .gt_subtitle {
  color: #333333;
  font-size: 85%;
  font-weight: initial;
  padding-top: 3px;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-color: #FFFFFF;
  border-top-width: 0;
}

#kocanygkly .gt_heading {
  background-color: #FFFFFF;
  text-align: center;
  border-bottom-color: #FFFFFF;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#kocanygkly .gt_bottom_border {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kocanygkly .gt_col_headings {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#kocanygkly .gt_col_heading {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
  padding-right: 5px;
  overflow-x: hidden;
}

#kocanygkly .gt_column_spanner_outer {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 4px;
}

#kocanygkly .gt_column_spanner_outer:first-child {
  padding-left: 0;
}

#kocanygkly .gt_column_spanner_outer:last-child {
  padding-right: 0;
}

#kocanygkly .gt_column_spanner {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow-x: hidden;
  display: inline-block;
  width: 100%;
}

#kocanygkly .gt_spanner_row {
  border-bottom-style: hidden;
}

#kocanygkly .gt_group_heading {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  text-align: left;
}

#kocanygkly .gt_empty_group_heading {
  padding: 0.5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: middle;
}

#kocanygkly .gt_from_md &gt; :first-child {
  margin-top: 0;
}

#kocanygkly .gt_from_md &gt; :last-child {
  margin-bottom: 0;
}

#kocanygkly .gt_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 10px;
  border-top-style: solid;
  border-top-width: 1px;
  border-top-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  overflow-x: hidden;
}

#kocanygkly .gt_stub {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
}

#kocanygkly .gt_stub_row_group {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: top;
}

#kocanygkly .gt_row_group_first td {
  border-top-width: 2px;
}

#kocanygkly .gt_row_group_first th {
  border-top-width: 2px;
}

#kocanygkly .gt_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#kocanygkly .gt_first_summary_row {
  border-top-style: solid;
  border-top-color: #D3D3D3;
}

#kocanygkly .gt_first_summary_row.thick {
  border-top-width: 2px;
}

#kocanygkly .gt_last_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kocanygkly .gt_grand_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#kocanygkly .gt_first_grand_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-style: double;
  border-top-width: 6px;
  border-top-color: #D3D3D3;
}

#kocanygkly .gt_last_grand_summary_row_top {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: double;
  border-bottom-width: 6px;
  border-bottom-color: #D3D3D3;
}

#kocanygkly .gt_striped {
  background-color: rgba(128, 128, 128, 0.05);
}

#kocanygkly .gt_table_body {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#kocanygkly .gt_footnotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#kocanygkly .gt_footnote {
  margin: 0px;
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#kocanygkly .gt_sourcenotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#kocanygkly .gt_sourcenote {
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#kocanygkly .gt_left {
  text-align: left;
}

#kocanygkly .gt_center {
  text-align: center;
}

#kocanygkly .gt_right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#kocanygkly .gt_font_normal {
  font-weight: normal;
}

#kocanygkly .gt_font_bold {
  font-weight: bold;
}

#kocanygkly .gt_font_italic {
  font-style: italic;
}

#kocanygkly .gt_super {
  font-size: 65%;
}

#kocanygkly .gt_footnote_marks {
  font-size: 75%;
  vertical-align: 0.4em;
  position: initial;
}

#kocanygkly .gt_asterisk {
  font-size: 100%;
  vertical-align: 0;
}

#kocanygkly .gt_indent_1 {
  text-indent: 5px;
}

#kocanygkly .gt_indent_2 {
  text-indent: 10px;
}

#kocanygkly .gt_indent_3 {
  text-indent: 15px;
}

#kocanygkly .gt_indent_4 {
  text-indent: 20px;
}

#kocanygkly .gt_indent_5 {
  text-indent: 25px;
}
&lt;/style&gt;
&lt;table class=&#34;gt_table&#34; data-quarto-disable-processing=&#34;false&#34; data-quarto-bootstrap=&#34;false&#34;&gt;
  &lt;thead&gt;
    &lt;tr class=&#34;gt_col_headings&#34;&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;tL&#34;&gt;tL&lt;/th&gt;
      &lt;th class=&#34;gt_col_heading gt_columns_bottom_border gt_right&#34; rowspan=&#34;1&#34; colspan=&#34;1&#34; scope=&#34;col&#34; id=&#34;tR&#34;&gt;tR&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody class=&#34;gt_table_body&#34;&gt;
    &lt;tr&gt;&lt;td headers=&#34;tL&#34; class=&#34;gt_row gt_right&#34;&gt;3.724500&lt;/td&gt;
&lt;td headers=&#34;tR&#34; class=&#34;gt_row gt_right&#34;&gt;5.510304&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;tL&#34; class=&#34;gt_row gt_right&#34;&gt;4.381377&lt;/td&gt;
&lt;td headers=&#34;tR&#34; class=&#34;gt_row gt_right&#34;&gt;6.654224&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;tL&#34; class=&#34;gt_row gt_right&#34;&gt;4.588020&lt;/td&gt;
&lt;td headers=&#34;tR&#34; class=&#34;gt_row gt_right&#34;&gt;5.483614&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;tL&#34; class=&#34;gt_row gt_right&#34;&gt;3.847835&lt;/td&gt;
&lt;td headers=&#34;tR&#34; class=&#34;gt_row gt_right&#34;&gt;6.003948&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td headers=&#34;tL&#34; class=&#34;gt_row gt_right&#34;&gt;3.522282&lt;/td&gt;
&lt;td headers=&#34;tR&#34; class=&#34;gt_row gt_right&#34;&gt;5.033487&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  
  
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;p&gt;By typing &lt;code&gt;simdat$Dobsincub&lt;/code&gt;, the user has access to the generated incubation intervals (expressed in days), corresponding here to a data frame with two columns and &lt;span class=&#34;math inline&#34;&gt;\(n=40\)&lt;/span&gt; rows. This is the data frame that is injected in the &lt;code&gt;estimIncub()&lt;/code&gt; routine:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fit &amp;lt;- estimIncub(x = simdat$Dobsincub, verbose = TRUE)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## ----------------------------------------------------------------
## Time elapsed: 1.339 seconds.
## Fitted density is Log-Normal with meanlog=1.617 and sdlog=0.317.
## Mean incubation period (days): 5.298 with 95% CI: 5.086-5.615.
## 95th percentile (days): 8.484 with 95% CI: 8.121-9.089.
## ----------------------------------------------------------------&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output in the R console can easily be interpreted. It tells us that the model chooses a Lognormal density fit for the incubation period with a mean of 5.3 days (95% CI: 5.0-5.6 days). More detailed summary statistics are accessible by typing &lt;code&gt;fit$stats&lt;/code&gt;, such as the posterior standard deviation and additional percentiles. What happens under the hood? Basically, the model computes a semi-parametric fit to the data and compares it with classic parametric fits (Lognormal, Weibull and Gamma) used for incubation modeling. The candidate with the lowest Bayesian information criterion (BIC) wins the game and is finally selected (here the Lognormal distribution). The incubation windows and the fitted incubation density can be obtained by typing:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;grid.arrange(plot(fit, typ = &amp;quot;incubwin&amp;quot;), plot(fit, type = &amp;quot;pdf&amp;quot;), nrow = 1)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/epilps-for-estimation-of-incubation-times/index_files/figure-html/estimincubation-2-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;real-data-example&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Real data example&lt;/h1&gt;
&lt;p&gt;The flexible Bayesian methodology is illustrated on SARS-CoV-2 symptom onset and exposure window data extracted from cases in Vietnam. The dataset was analyzed in &lt;a href=&#34;https://doi.org/10.1371/journal.pone.0243889&#34;&gt;Bui et al. (2020)&lt;/a&gt; and is publicly available on the GitHub repository provided in the article (&lt;a href=&#34;https://github.com/longbui/Covid19IncubVN&#34; class=&#34;uri&#34;&gt;https://github.com/longbui/Covid19IncubVN&lt;/a&gt;; last accessed July 17, 2024). The dataset contains information about &lt;span class=&#34;math inline&#34;&gt;\(n=19\)&lt;/span&gt; cases identified from January 23, 2020 to April 13, 2020. After continuity corrections (required to change calendar dates into continuous time points), the left and right incubation bounds are given by:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Left incubation bound
tL &amp;lt;- c(0.504, 2.983, 5.343, 6.969, 6.990, 2.570, 6.870, 1.263, 0.693, 1.869, 1.151, 2.748, 1.209, 1.161, 4.982, 4.017, 2.170, 9.805, 1.659)

# Right incubation bound
tR &amp;lt;- c(1.491, 7.762, 11.777, 12.821, 11.359, 8.551, 24.954, 4.144, 6.408, 7.083, 4.191, 10.326, 9.942, 7.254, 12.690, 10.825, 14.478, 16.592, 18.649)

# Data set
dataVietnam &amp;lt;- data.frame(tL = tL, tR = tR)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;estimIncub()&lt;/code&gt; routine provides a Weibull fit with a mean incubation period of 6.7 days (95% CI: 5.8-7.4 days) and the standard deviation (extracted by typing &lt;code&gt;incubfit$stats&lt;/code&gt;) is 3.3 days (95% CI: 3.0-3.8 days). A figure of the incubation windows and the fitted Weibull density (with 95% credible interval) is also provided.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;set.seed(2024)
incubfit &amp;lt;- EpiLPS::estimIncub(x = dataVietnam, verbose = TRUE, tmax = 25)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## ----------------------------------------------------------------
## Time elapsed: 1.13 seconds.
## Fitted density is Weibull with shape=2.142 and scale=7.521.
## Mean incubation period (days): 6.661 with 95% CI: 5.753-7.375.
## 95th percentile (days): 12.552 with 95% CI: 11.931-14.087.
## ----------------------------------------------------------------&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;grid.arrange(plot(incubfit, typ = &amp;quot;incubwin&amp;quot;), plot(incubfit, type = &amp;quot;pdf&amp;quot;), nrow = 1)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/epilps-for-estimation-of-incubation-times/index_files/figure-html/RealData-3-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;p&gt;Gressani, O., Torneri, A., Hens, N. and Faes, C. (2024). Flexible Bayesian estimation of incubation times. &lt;em&gt;American Journal of Epidemiology&lt;/em&gt; (Accepted manuscript). &lt;a href=&#34;https://doi.org/10.1093/aje/kwae192&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1093/aje/kwae192&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Gressani, O., Wallinga, J., Althaus, C. L., Hens, N. and Faes, C.
(2022). EpiLPS: A fast and flexible Bayesian tool for estimation of the
time-varying reproduction number. &lt;em&gt;PLoS Comput Biol&lt;/em&gt; &lt;strong&gt;18&lt;/strong&gt;(10):
e1010618. &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1010618&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1371/journal.pcbi.1010618&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Eddelbuettel, D. and Francois, R. (2011). Rcpp: Seamless R and C++ Integration. &lt;em&gt;Journal of Statistical Software&lt;/em&gt;, &lt;strong&gt;40&lt;/strong&gt;(8), 1–18. &lt;a href=&#34;https://doi.org/10.18637/jss.v040.i08&#34; class=&#34;uri&#34;&gt;https://doi.org/10.18637/jss.v040.i08&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ferretti, L. et al. (2020). Quantifying SARS-CoV-2 transmission suggests epidemic control with
digital contact tracing. &lt;em&gt;Science&lt;/em&gt; &lt;strong&gt;368&lt;/strong&gt;, eabb6936. &lt;a href=&#34;https://doi.org/10.1126/science.abb6936&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1126/science.abb6936&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Bui LV, Nguyen HT, Levine H, Nguyen HN, Nguyen T-A, Nguyen TP, et al. (2020) Estimation of the incubation period of COVID-19 in Vietnam. &lt;em&gt;PLoS ONE&lt;/em&gt; &lt;strong&gt;15&lt;/strong&gt;(12): e0243889. &lt;a href=&#34;https://doi.org/10.1371/journal.pone.0243889&#34; class=&#34;uri&#34;&gt;https://doi.org/10.1371/journal.pone.0243889&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Impact of a Food Rebalancing Program Associated with Plant-Derived Food Supplements on the Biometric, Behavioral, and Biological Parameters of Obese Subjects&#39;</title>
      <link>https://statsandr.com/blog/paper-impact-food-rebalancing-program-on-biometric-behavioral-biological-parameters-of-obese-subjects/</link>
      <pubDate>Tue, 14 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-impact-food-rebalancing-program-on-biometric-behavioral-biological-parameters-of-obese-subjects/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/impact-food-rebalancing-program-on-biometric-behavioral-biological-parameters-of-obese-subjects.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to announce that our paper has been accepted for publication in &lt;em&gt;Nutrients&lt;/em&gt; (ISSN 2072-6643) &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-nu15224780&#34;&gt;Houben et al. 2023&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This study investigates the impact of a food rebalancing program associated with plant-derived food supplements on the biometric, behavioral, and biological parameters of obese subjects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read more &lt;a href=&#34;https://www.mdpi.com/2559926&#34;&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks to all co-authors for the great work, and the Nutrients Editorial Office for their guidance throughout this process. We are also thankful to the two anonymous reviewers for their input that has greatly helped shape the paper.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2 unnumbered&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-nu15224780&#34; class=&#34;csl-entry&#34;&gt;
Houben, Jean-Jacques, Yvon Carpentier, Genevieve Paulissen, Georges Van Snick, and Antoine Soetewey. 2023. &lt;span&gt;“Impact of a Food Rebalancing Program Associated with Plant-Derived Food Supplements on the Biometric, Behavioral, and Biological Parameters of Obese Subjects.”&lt;/span&gt; &lt;em&gt;Nutrients&lt;/em&gt; 15 (22). &lt;a href=&#34;https://doi.org/10.3390/nu15224780&#34;&gt;https://doi.org/10.3390/nu15224780&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Childhood Bacterial Meningitis Surveillance in Southern Vietnam: Trends and Vaccination Implications from 2012 to 2021&#39;</title>
      <link>https://statsandr.com/blog/paper-childhood-bacterial-meningitis-surveillance-southern-vietnam/</link>
      <pubDate>Mon, 08 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-childhood-bacterial-meningitis-surveillance-southern-vietnam/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/Childhood%20Bacterial%20Meningitis%20Surveillance%20in%20Southern%20Vietnam-Trends%20and%20Vaccination%20Implications%20from%202012%20to%202021.jpeg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to announce that a paper I contributed to has been accepted for publication in Open Forum Infectious Diseases &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-truong2023childhood&#34; role=&#34;doc-biblioref&#34;&gt;Truong et al. 2023&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This study investigates bacterial meningitis among children aged under five years in Southern Vietnam for the last 10 years.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read more &lt;a href=&#34;https://doi.org/10.1093/ofid/ofad229&#34;&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I hope this paper will, to some extent, be helpful for your research.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2 unnumbered&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-truong2023childhood&#34; class=&#34;csl-entry&#34;&gt;
Truong, Hieu Cong, Thanh Van Phan, Hung Thanh Nguyen, Khanh Huu Truong, Viet Chau Do, Nguyet Nguyen My Pham, Thang Vinh Ho, et al. 2023. &lt;span&gt;“Childhood Bacterial Meningitis Surveillance in Southern Vietnam: Trends and Vaccination Implications from 2012 to 2021.”&lt;/span&gt; In &lt;em&gt;Open Forum Infectious Diseases&lt;/em&gt;, ofad229. Oxford University Press. &lt;a href=&#34;https://doi.org/10.1093/ofid/ofad229&#34;&gt;https://doi.org/10.1093/ofid/ofad229&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;EpiLPS: A fast and flexible Bayesian tool for estimation of the time-varying reproduction number&#39;</title>
      <link>https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/</link>
      <pubDate>Wed, 19 Oct 2022 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#introduction&#34; id=&#34;toc-introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#motivation&#34; id=&#34;toc-motivation&#34;&gt;Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#getting-started&#34; id=&#34;toc-getting-started&#34;&gt;Getting started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#a-simulated-example&#34; id=&#34;toc-a-simulated-example&#34;&gt;A simulated example&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#smoothing-the-epidemic-curve-and-estimating-mathcalr_t&#34; id=&#34;toc-smoothing-the-epidemic-curve-and-estimating-mathcalr_t&#34;&gt;Smoothing the epidemic curve and estimating &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#usa-hospitalization-data&#34; id=&#34;toc-usa-hospitalization-data&#34;&gt;USA hospitalization data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#conclusion&#34; id=&#34;toc-conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#references&#34; id=&#34;toc-references&#34;&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;img src=&#34;images/EpiLPS.PNG&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;div id=&#34;introduction&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;A colleague (and friend) of mine recently published a research paper entitled “EpiLPS: A fast and flexible Bayesian tool for estimation of the time-varying reproduction number” in PLoS Computational Biology.&lt;/p&gt;
&lt;p&gt;I am not in the habit of sharing research paper to which I did not contribute. Nevertheless, I would like to make an exception with this one because I strongly believe that the method developed in the paper deserves to be known, especially for anyone working in epidemiology.&lt;/p&gt;
&lt;p&gt;Below is the motivation behind the article, as well as an illustration on simulated and real data (US hospitalization data). More information can be found in the &lt;a href=&#34;https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1010618&#34;&gt;paper&lt;/a&gt; and on the accompanying &lt;a href=&#34;https://epilps.com/&#34;&gt;website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;motivation&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Motivation&lt;/h1&gt;
&lt;p&gt;EpiLPS &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-gressani2022epilps&#34; role=&#34;doc-biblioref&#34;&gt;Gressani et al. 2022&lt;/a&gt;)&lt;/span&gt; is a methodology for flexible Bayesian inference of the time-varying reproduction number &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt;; the average number of secondary cases generated by an infected agent at time &lt;span class=&#34;math inline&#34;&gt;\(t\)&lt;/span&gt;. This is a key epidemiological parameter that informs about the transmission potential of an infectious disease and can be used by public health authorities to gauge the effectiveness of interventions and propose an orientation for future control strategies.&lt;/p&gt;
&lt;p&gt;This metric has gained in popularity during the SARS-CoV-2 pandemic with wide media coverage as its meaning is easily and intuitively grasped. Put simply, when &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R} &amp;lt; 1\)&lt;/span&gt;, the signal is encouraging as the epidemic is under control and will eventually vanish. On the contrary, a value of &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R} &amp;gt; 1\)&lt;/span&gt; means that the disease keeps spreading and infections are witnessing an expansionary impact. Having a robust and reliable tool to compute the reproduction number from infectious disease data is therefore crucial.&lt;/p&gt;
&lt;p&gt;A group of researchers in the EpiPose team from Hasselt University (Belgium), Leiden University (The Netherlands), and the University of Bern (Switzerland) have recently developed a new methodology for estimating the instantaneous reproduction number from incidence time series data for a given serial interval distribution (the time elapsed between the onset of symptoms in an infector and the onset of symptoms of secondary cases).&lt;/p&gt;
&lt;p&gt;They termed their approach EpiLPS for “&lt;strong&gt;Epi&lt;/strong&gt;demiological modeling with &lt;strong&gt;L&lt;/strong&gt;aplacian-&lt;strong&gt;P&lt;/strong&gt;-&lt;strong&gt;S&lt;/strong&gt;plines” as Laplace approximations and P-splines smoothers are key ingredients that form the backbone of the proposed methodology.&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;img src=&#34;images/Infographic_EpiLPS.png&#34; style=&#34;width:100.0%&#34; /&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;The EpiLPS model assumes that the observed reported cases (by reporting date or date of symptom onset) are governed by a negative binomial distribution. As such, it allows to take the feature of overdispersion into account, contrary to a Poisson model. The epidemic curve is smoothed with P-splines (where posterior estimates of latent variables are computed via Laplace approximations) in a first step and a renewal equation model is used in a second step as a bridge between the reproduction number and the estimated spline coefficients through a “plug-in” method.&lt;/p&gt;
&lt;p&gt;The authors also explain the main difference between EpiLPS and EpiEstim, a well established approached for estimating &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt; in real-time developed by &lt;span class=&#34;citation&#34;&gt;Cori et al. (&lt;a href=&#34;#ref-cori2013new&#34; role=&#34;doc-biblioref&#34;&gt;2013&lt;/a&gt;)&lt;/span&gt; and make extensive comparisons between the two approaches under different epidemic scenarios.&lt;/p&gt;
&lt;p&gt;An interesting feature of EpiLPS is that the user can choose between a fully “sampling-free” path, where model hyperparameters are fixed at their &lt;em&gt;maximum a posteriori&lt;/em&gt; (LPSMAP) or a fully stochastic path (LPSMALA) based on a Metropolis-adjusted Langevin algorithm (LPSMALA). Talking about efficiency, routines for Laplace approximations and B-splines evaluations have been coded in C++ and integrated in R via the &lt;a href=&#34;https://www.rcpp.org/&#34;&gt;Rcpp package&lt;/a&gt;, so that the underlying algorithm can be executed in negligible time.&lt;/p&gt;
&lt;p&gt;Below, we provide a short example of how to use the EpiLPS routines to estimate &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;getting-started&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Getting started&lt;/h1&gt;
&lt;p&gt;The EpiLPS package is available from CRAN (see &lt;a href=&#34;https://cran.r-project.org/web/packages/EpiLPS/index.html&#34; class=&#34;uri&#34;&gt;https://cran.r-project.org/web/packages/EpiLPS/index.html&lt;/a&gt;) and can be installed from the R console by typing:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;EpiLPS&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The package can then be loaded as follows:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;library(&amp;quot;EpiLPS&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The EpiLPS package structure is fairly simple as it consists in a few routines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The function &lt;code&gt;epilps()&lt;/code&gt; is the core routine for fitting the reproduction number.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;plot.epilps()&lt;/code&gt;, the user can plot the estimated epidemic curve and &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Finally, two ancillary routines, &lt;code&gt;episim()&lt;/code&gt; and &lt;code&gt;perfcheck()&lt;/code&gt; have been developed to essentially reproduce the simulation results of the associated paper.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&#34;a-simulated-example&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;A simulated example&lt;/h1&gt;
&lt;p&gt;A set of epidemic data can be simulated with the &lt;code&gt;episim()&lt;/code&gt; routine by specifying a serial interval distribution and by choosing among a set of available patterns for the true reproduction number curve (here we choose pattern number 5 corresponding to a rather wiggly curve).&lt;/p&gt;
&lt;p&gt;The simulated outbreak is for a duration of 40 days as specified in the &lt;code&gt;endepi&lt;/code&gt; option. By setting the option &lt;code&gt;plotsim = TRUE&lt;/code&gt;, the routine returns a figure summarizing the incidence time series, a bar plot for the specified serial interval distribution and the true underlying reproduction number curve.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;set.seed(1234)

SI &amp;lt;- c(0.344, 0.316, 0.168, 0.104, 0.068)
simepidemic &amp;lt;- episim(
  serial_interval = SI,
  Rpattern = 5,
  plotsim = TRUE,
  verbose = TRUE,
  endepi = 40
)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Chosen scenario: 5 &amp;#39;Wiggly then stable Rt&amp;#39;.
## Incidence of cases generated from a Poisson distribution. 
## Total number of days of epidemic: 40.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/index_files/figure-html/Simul-1-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;If you want to have an overview of the generated incidence time series, just type:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;simepidemic$y&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##  [1]  10   6  15  24  37  43  54  46  47  28  20   8  10  10   3   5   3   4   6
## [20]   6  15  21  44  75 135 217 329 409 453 487 457 443 297 290 255 246 246 339
## [39] 395 573&lt;/code&gt;&lt;/pre&gt;
&lt;div id=&#34;smoothing-the-epidemic-curve-and-estimating-mathcalr_t&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Smoothing the epidemic curve and estimating &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Let us now use the &lt;code&gt;epilps()&lt;/code&gt; routine to smooth the epidemic curve and estimate the reproduction number.&lt;/p&gt;
&lt;p&gt;We will do this through LPSMAP (a fully sampling-free approach) and via LPSMALA (a fully stochastic approach relying on a MCMC algorithm with Langevin dynamics), where we specify a chain of length 10000 and a burn-in of size 4000.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;LPSMAP_fit &amp;lt;- epilps(
  incidence = simepidemic$y,
  serial_interval = SI,
  tictoc = TRUE
)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Inference method chosen: LPSMAP. 
## CI for LPSMAP computed via lognormal posterior approx. of Rt.Total number of days: 40. 
## Mean Rt discarding first 7 days: 1.327.
## Mean 95% CI of Rt discarding first 7 days: (1.164,1.527) 
## Elapsed real time (wall clock time): 0.261 seconds.&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;LPSMALA_fit &amp;lt;- epilps(
  incidence = simepidemic$y, serial_interval = SI,
  method = &amp;quot;LPSMALA&amp;quot;, chain_length = 10000, burn = 4000
)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Inference method chosen: LPSMALA with chain length 10000 and warmup 4000.
## MCMC acceptance rate: 56.41%. 
## Geweke z-score &amp;lt; 2.33 for:  32 / 33  variables. 
## Total number of days: 40. 
## Mean Rt discarding first 7 days: 1.326.
## Mean 95% CI of Rt discarding first 7 days: (1.117,1.555). 
## Timing of routine not requested.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After execution, each routine prints in the console a brief summary of the method that has been requested by the user.&lt;/p&gt;
&lt;p&gt;For LPSMALA, it summarizes the chain length, the acceptance rate (should be around 56%) and other basic information. As can be seen from the printed output, the mean reproduction number for the simulated epidemic is around 1.33.&lt;/p&gt;
&lt;p&gt;We can now use, say, the &lt;code&gt;LPSMALA_fit&lt;/code&gt; object together with the &lt;code&gt;plot()&lt;/code&gt; routine to obtain the smoothed epidemic curve and the estimated reproduction number (by default the credible interval is at a 5% level of significance but this can be changed by the user).&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;days &amp;lt;- seq(8, 40)

#--- Smoothed epidemic curve
gridExtra::grid.arrange(
  plot(LPSMALA_fit,
    plotout = &amp;quot;epicurve&amp;quot;, incibars = TRUE, themetype = &amp;quot;light&amp;quot;,
    epicol = &amp;quot;darkgreen&amp;quot;, cicol = rgb(0.3, 0.73, 0.3, 0.2),
    epititle = &amp;quot;Smoothed epidemic curve&amp;quot;, titlesize = 13, barwidth = 0.25
  ),

  #--- Estimated reproduction number
  plot(LPSMALA_fit,
    plotout = &amp;quot;rt&amp;quot;, theme = &amp;quot;light&amp;quot;, rtcol = &amp;quot;black&amp;quot;,
    titlesize = 13, Rtitle = &amp;quot;Estimated R (LPSMALA)&amp;quot;
  ),
  nrow = 1, ncol = 2
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/index_files/figure-html/Simul-4-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The figure can be customized in various ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Users can specify the theme under &lt;code&gt;themetype&lt;/code&gt;. Available options are &lt;code&gt;gray&lt;/code&gt; (the default), &lt;code&gt;classic&lt;/code&gt;, &lt;code&gt;light&lt;/code&gt; and &lt;code&gt;dark&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Other choices, such as whether or not to show the incidence bars, the color of the credible interval envelope, the color of the smoothed epidemic curve and the estimated reproduction number are also available.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The figure above was generated within the &lt;a href=&#34;https://statsandr.com/blog/graphics-in-r-with-ggplot2/&#34;&gt;&lt;code&gt;ggplot2&lt;/code&gt; package&lt;/a&gt;, but there is also another way of extracting information directly from the &lt;code&gt;LPSMAP_fit&lt;/code&gt; and &lt;code&gt;LPSMALA_fit&lt;/code&gt; objects. In fact, the estimated reproduction number values and their associated credible interval for each day can be extracted and plotted.&lt;/p&gt;
&lt;p&gt;Below, we make the exercise and plot the estimated &lt;span class=&#34;math inline&#34;&gt;\(\mathcal{R}_t\)&lt;/span&gt; obtained with LPSMAP and LPSMALA, respectively and compare it with the true underlying reproduction number curve. The fit is quite good.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;par(mfrow = c(1, 2))

#--- LPSMAP vs target R
plot(days, sapply(days, simepidemic$Rtrue),
  type = &amp;quot;l&amp;quot;, lwd = 2, ylim = c(0, 4),
  ylab = &amp;quot;Estimated R&amp;quot;, xlab = &amp;quot;Time&amp;quot;
)
polygon(
  x = c(days, rev(days)), y = c(
    LPSMAP_fit$epifit$R95CI_low[8:40],
    rev(LPSMAP_fit$epifit$R95CI_up[8:40])
  ),
  col = rgb(0.23, 0.54, 1, 0.3), border = NA
)
lines(days, LPSMAP_fit$epifit$R_estim[8:40], type = &amp;quot;l&amp;quot;, col = &amp;quot;cornflowerblue&amp;quot;, lwd = 2)
lines(days, sapply(days, simepidemic$Rtrue), type = &amp;quot;l&amp;quot;, lwd = 2)

grid(nx = 10, ny = 10)
legend(&amp;quot;topright&amp;quot;,
  lty = c(1, 1), lwd = c(2, 2),
  col = c(&amp;quot;black&amp;quot;, &amp;quot;blue&amp;quot;, rgb(0.23, 0.54, 1, 0.3)),
  c(&amp;quot;Target R&amp;quot;, &amp;quot;LPSMAP&amp;quot;, &amp;quot;LPSMAP 95% CI&amp;quot;), bty = &amp;quot;n&amp;quot;, cex = 0.9
)

#--- LPSMALA vs target R
plot(days, sapply(days, simepidemic$Rtrue),
  type = &amp;quot;l&amp;quot;, lwd = 2, ylim = c(0, 4),
  ylab = &amp;quot;Estimated R&amp;quot;, xlab = &amp;quot;Time&amp;quot;
)
polygon(
  x = c(days, rev(days)), y = c(
    LPSMALA_fit$epifit$R95CI_low[8:40],
    rev(LPSMALA_fit$epifit$R95CI_up[8:40])
  ),
  col = rgb(1, 0.23, 0.31, 0.3), border = NA
)
lines(days, LPSMALA_fit$epifit$R_estim[8:40], type = &amp;quot;l&amp;quot;, col = &amp;quot;red&amp;quot;, lwd = 2)
lines(days, sapply(days, simepidemic$Rtrue), type = &amp;quot;l&amp;quot;, lwd = 2)

grid(nx = 10, ny = 10)
legend(&amp;quot;topright&amp;quot;,
  lty = c(1, 1), lwd = c(2, 2),
  col = c(&amp;quot;black&amp;quot;, &amp;quot;red&amp;quot;, rgb(1, 0.23, 0.31, 0.3)),
  c(&amp;quot;Target R&amp;quot;, &amp;quot;LPSMALA&amp;quot;, &amp;quot;LPSMALA 95% CI&amp;quot;), bty = &amp;quot;n&amp;quot;, cex = 0.9
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/index_files/figure-html/Simul-5-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;You can access, say, the results of the last week of the epidemic by typing:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Estimated R of the last week (with LPSMAP)
round(tail(LPSMAP_fit$epifit[, 1:4], 7), 3)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##    Date R_estim R95CI_low R95CI_up
## 34   34   0.708     0.663    0.756
## 35   35   0.724     0.676    0.775
## 36   36   0.809     0.755    0.868
## 37   37   0.971     0.908    1.039
## 38   38   1.205     1.135    1.279
## 39   39   1.461     1.384    1.541
## 40   40   1.671     1.557    1.794&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Estimated mean number of cases of the last week (with LPSMAP)
round(tail(LPSMAP_fit$epifit[, 5:7], 7))&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##    mu_estim mu95CI_low mu95CI_up
## 34      284        225       357
## 35      254        202       319
## 36      248        196       312
## 37      267        211       338
## 38      319        253       404
## 39      411        325       520
## 40      552        394       774&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;usa-hospitalization-data&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;USA hospitalization data&lt;/h1&gt;
&lt;p&gt;To illustrate EpiLPS on real data, we download hospitalization data from the &lt;code&gt;COVID19&lt;/code&gt; package for the USA in the period ranging from 2021-09-01 to 2022-09-01 and apply the &lt;code&gt;epilps()&lt;/code&gt; routine to estimate the reproduction number.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;install.packages(&amp;quot;COVID19&amp;quot;)
library(&amp;quot;COVID19&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# Get data and specify serial interval distribution
USADat &amp;lt;- COVID19::covid19(
  country = &amp;quot;US&amp;quot;, level = 1, start = &amp;quot;2021-09-01&amp;quot;,
  end = &amp;quot;2022-09-01&amp;quot;, verbose = FALSE
)

si &amp;lt;- c(0.344, 0.316, 0.168, 0.104, 0.068)

inciUSA &amp;lt;- USADat$hosp
dateUSA &amp;lt;- USADat$date&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We use the &lt;code&gt;epilps()&lt;/code&gt; routine with method LPSMAP (default) and plot the smoothed epidemic curve and the estimated reproduction number with a 95% credible interval.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;epifit &amp;lt;- epilps(incidence = inciUSA, serial_interval = si, K = 20)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## Inference method chosen: LPSMAP. 
## CI for LPSMAP computed via lognormal posterior approx. of Rt.Total number of days: 366. 
## Mean Rt discarding first 7 days: 0.994.
## Mean 95% CI of Rt discarding first 7 days: (0.983,1.005) 
## Timing of routine not requested.&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;gridExtra::grid.arrange(
  plot(epifit,
    dates = dateUSA, datelab = &amp;quot;3m&amp;quot;,
    plotout = &amp;quot;epicurve&amp;quot;, incibars = FALSE, themetype = &amp;quot;light&amp;quot;,
    epicol = &amp;quot;darkgreen&amp;quot;, cicol = rgb(0.3, 0.73, 0.3, 0.2),
    epititle = &amp;quot;USA smoothed epidemic curve&amp;quot;, titlesize = 13
  ),
  plot(epifit,
    dates = dateUSA, datelab = &amp;quot;3m&amp;quot;,
    plotout = &amp;quot;rt&amp;quot;, theme = &amp;quot;light&amp;quot;, rtcol = &amp;quot;black&amp;quot;,
    titlesize = 13, Rtitle = &amp;quot;USA Estimated R&amp;quot;
  ),
  nrow = 1, ncol = 2
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/paper-epilps-a-fast-and-flexible-bayesian-tool-for-estimation-of-the-time-varying-reproduction-number/index_files/figure-html/USA-2-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;conclusion&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;p&gt;I hope you will find the method developed in the paper as useful as I do. Feel free to reach out to me and to the authors if you happen to use it for your own research.&lt;/p&gt;
&lt;p&gt;As always, if you have a question or a suggestion related to the topic covered in this article, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level1 unnumbered&#34;&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-cori2013new&#34; class=&#34;csl-entry&#34;&gt;
Cori, Anne, Neil M Ferguson, Christophe Fraser, and Simon Cauchemez. 2013. &lt;span&gt;“A New Framework and Software to Estimate Time-Varying Reproduction Numbers During Epidemics.”&lt;/span&gt; &lt;em&gt;American Journal of Epidemiology&lt;/em&gt; 178 (9): 1505–12.
&lt;/div&gt;
&lt;div id=&#34;ref-gressani2022epilps&#34; class=&#34;csl-entry&#34;&gt;
Gressani, Oswaldo, Jacco Wallinga, Christian L Althaus, Niel Hens, and Christel Faes. 2022. &lt;span&gt;“EpiLPS: A Fast and Flexible Bayesian Tool for Estimation of the Time-Varying Reproduction Number.”&lt;/span&gt; &lt;em&gt;PLoS Computational Biology&lt;/em&gt; 18 (10): e1010618. &lt;a href=&#34;https://doi.org/10.1371/journal.pcbi.1010618&#34;&gt;https://doi.org/10.1371/journal.pcbi.1010618&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Semi-Markov modeling for cancer insurance&#39;</title>
      <link>https://statsandr.com/blog/paper-semi-markov-modeling-for-cancer-insurance/</link>
      <pubDate>Wed, 06 Apr 2022 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/paper-semi-markov-modeling-for-cancer-insurance/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;images/Semi-Markov%20modeling%20for%20cancer%20insurance.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to announce that our paper entitled “&lt;a href=&#34;https://rdcu.be/cKLGO&#34;&gt;Semi-Markov modeling for cancer insurance&lt;/a&gt;” has been accepted for publication in the European Actuarial Journal &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-soetewey2022semi&#34; role=&#34;doc-biblioref&#34;&gt;Soetewey et al. 2022&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Advancements in medicine and biostatistics have already resulted in a better access to insurance for people diagnosed with cancer. This materializes into the “right to be forgotten” adopted in several EU member states, granting access to insurance after a waiting period of at most 10 years starting at the end of the successful therapeutic protocol.&lt;/p&gt;
&lt;p&gt;This paper concentrates on insurance covers on a market where such a right has been implemented. Stand-alone products are considered, as well as guarantees included as a rider in an existing package. The cost of offering standard premium rates to all applicants in mortgage insurance related to property loans is also evaluated.&lt;/p&gt;
&lt;p&gt;The 3-state (healthy—ill—dead) Semi-Markov hierarchical model developed in Denuit et al. (2019) for long-term care insurance is adopted here for actuarial calculations. Semi-Markov transition intensities are estimated from cancer cases recorded by the Belgian Cancer Registry. The obtained results suggest that a new offer could develop, targeting the particular needs of cancer patients.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read more &lt;a href=&#34;https://rdcu.be/cKLGO&#34;&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note that this paper is written jointly with Prof. Legrand and Prof. Denuit—my PhD supervisors at UCLouvain—and Dr. Silversmit from the Belgian Cancer Registry.&lt;/p&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;p&gt;I hope this paper will, to some extent, be helpful for your research.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2 unnumbered&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-soetewey2022semi&#34; class=&#34;csl-entry&#34;&gt;
Soetewey, Antoine, Catherine Legrand, Michel Denuit, and Geert Silversmit. 2022. &lt;span&gt;“Semi-Markov Modeling for Cancer Insurance.”&lt;/span&gt; &lt;em&gt;European Actuarial Journal&lt;/em&gt;, 1–25. &lt;a href=&#34;https://doi.org/10.1007/s13385-022-00308-2&#34;&gt;https://doi.org/10.1007/s13385-022-00308-2&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>Paper: &#39;Waiting period from diagnosis for mortgage insurance issued to cancer survivors&#39;</title>
      <link>https://statsandr.com/blog/waiting-period-cancer-survivors/</link>
      <pubDate>Mon, 23 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/waiting-period-cancer-survivors/</guid>
      <description>


&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-11-23-waiting-period-cancer-survivors_files/waiting-period-cancer-survivors.jpeg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;I am happy to announce that our paper entitled “&lt;a href=&#34;https://rdcu.be/cbagv&#34; target=&#34;_blank&#34;&gt;Waiting period from diagnosis for mortgage insurance issued to cancer survivors&lt;/a&gt;” has been published in the European Actuarial Journal &lt;span class=&#34;citation&#34;&gt;(&lt;a href=&#34;#ref-soetewey2021waiting&#34; role=&#34;doc-biblioref&#34;&gt;Soetewey et al. 2021&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Here is a brief &lt;strong&gt;summary&lt;/strong&gt; of it:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;
Massart (2018) testimonial illustrates the difficulties faced by patients having survived cancer to access mortgage insurance securing home loan. Data collected by national registries nevertheless suggest that excess mortality due to some types of cancer becomes moderate or even negligible after some waiting period.
&lt;/p&gt;
&lt;p&gt;
In relation to the insurance laws passed in France and more recently in Belgium creating a right to be forgotten for cancer survivors, the present study aims to determine the waiting period after which standard premium rates become applicable. Compared to the French and Belgian laws, a waiting period starting at diagnosis (as recorded in national databases) is favored over a waiting period starting at the end of the therapeutic treatment protocol. This aims to avoid disputes when a claim is filed. Since diagnosis is often recorded in the official registry database, as is the case for the Belgian Cancer Registry, its date is reliable and unquestionable in case of claim.
&lt;/p&gt;
&lt;p&gt;
Based on 28,994 melanoma and thyroid cancer cases recorded by the Belgian Cancer Registry, the length of the waiting period is assessed with the help of widely-accepted tools from biostatistics, including relative survival models and time-to-cure indicators. It turns out for instance that a waiting period of 4 years after diagnosis is enough for 30-year-old thyroid cancer patients. This appears to be similar to the 3-year period starting at the end of treatment protocol according to the Belgian law in such a case.
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Read the full article &lt;a href=&#34;https://rdcu.be/cbagv&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here is a video explaining the paper and our research in general:&lt;/p&gt;
&lt;center&gt;
&lt;iframe width=&#34;560&#34; height=&#34;315&#34; src=&#34;https://www.youtube.com/embed/qQrVV3prEDU&#34; frameborder=&#34;0&#34; allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&#34; allowfullscreen&gt;
&lt;/iframe&gt;
&lt;/center&gt;
&lt;p&gt;The paper also led to a &lt;a href=&#34;https://www.antoinesoetewey.com/files/Journee_modeles_de_guerison.pdf&#34; target=&#34;_blank&#34;&gt;talk&lt;/a&gt; organized by the French National Cancer Institute (INCa).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This paper is written jointly with Prof. Catherine Legrand and Prof. Michel Denuit—my PhD supervisors—and Dr. Geert Silversmit from the Belgian Cancer Registry.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Thanks for reading. I hope this paper will, to some extent, be helpful for your research.&lt;/p&gt;
&lt;p&gt;As always, if you have any question related to the topic covered in this paper, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;div id=&#34;references&#34; class=&#34;section level2 unnumbered&#34;&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div id=&#34;refs&#34; class=&#34;references csl-bib-body hanging-indent&#34;&gt;
&lt;div id=&#34;ref-soetewey2021waiting&#34; class=&#34;csl-entry&#34;&gt;
Soetewey, Antoine, Catherine Legrand, Michel Denuit, and Geert Silversmit. 2021. &lt;span&gt;“Waiting Period from Diagnosis for Mortgage Insurance Issued to Cancer Survivors.”&lt;/span&gt; &lt;em&gt;European Actuarial Journal&lt;/em&gt; 11: 135–60. &lt;a href=&#34;https://doi.org/10.1007/s13385-020-00254-x&#34;&gt;https://doi.org/10.1007/s13385-020-00254-x&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>COVID-19 in Belgium: is it over yet?</title>
      <link>https://statsandr.com/blog/covid-19-in-belgium-is-it-over-yet/</link>
      <pubDate>Fri, 22 May 2020 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/covid-19-in-belgium-is-it-over-yet/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#introduction&#34; id=&#34;toc-introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#new-hospital-admissions&#34; id=&#34;toc-new-hospital-admissions&#34;&gt;New hospital admissions&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#overall&#34; id=&#34;toc-overall&#34;&gt;Overall&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#by-period&#34; id=&#34;toc-by-period&#34;&gt;By period&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#zooming-in&#34; id=&#34;toc-zooming-in&#34;&gt;Zooming in&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#patients-in-hospitals&#34; id=&#34;toc-patients-in-hospitals&#34;&gt;Patients in hospitals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#patients-in-intensive-care&#34; id=&#34;toc-patients-in-intensive-care&#34;&gt;Patients in intensive care&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#confirmed-cases&#34; id=&#34;toc-confirmed-cases&#34;&gt;Confirmed cases&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#by-province&#34; id=&#34;toc-by-province&#34;&gt;By province&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#by-age-group-and-sex&#34; id=&#34;toc-by-age-group-and-sex&#34;&gt;By age group and sex&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#static&#34; id=&#34;toc-static&#34;&gt;Static&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#dynamic&#34; id=&#34;toc-dynamic&#34;&gt;Dynamic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#by-age-group-sex-and-province&#34; id=&#34;toc-by-age-group-sex-and-province&#34;&gt;By age group, sex and province&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#conclusion&#34; id=&#34;toc-conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&#34;introduction&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;Note 1: The present article has been written on May 22, 2020 and has been updated infrequently. The current situation regarding COVID-19 in Belgium may therefore be different to what is presented below. See my &lt;a href=&#34;https://twitter.com/statsandr&#34; target=&#34;_blank&#34;&gt;Twitter&lt;/a&gt; profile for more frequent updates of the plots.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note 2: This is a joint work with Prof. &lt;a href=&#34;https://twitter.com/NikoSpeybroeck&#34; target=&#34;_blank&#34;&gt;Niko Speybroeck&lt;/a&gt;, Prof. &lt;a href=&#34;https://twitter.com/CatherineLinard&#34; target=&#34;_blank&#34;&gt;Catherine Linard&lt;/a&gt;, Prof. &lt;a href=&#34;https://twitter.com/sdellicour&#34; target=&#34;_blank&#34;&gt;Simon Dellicour&lt;/a&gt; and &lt;a href=&#34;https://twitter.com/arosas_aguirre&#34; target=&#34;_blank&#34;&gt;Angel Rosas-Aguirre&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Belgium recently started to lift its lockdown measures initially imposed to contain the spread of the Covid-19. Following this decision taken by Belgian authorities, we analyze how the situation evolved so far.&lt;/p&gt;
&lt;p&gt;Contrarily to a previous article in which I analyzed the outbreak of the &lt;a href=&#34;https://statsandr.com/blog/covid-19-in-belgium/&#34;&gt;Coronavirus in Belgium using the SIR model&lt;/a&gt;, in this article we focus on the evolution of the number of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;hospital admissions&lt;/li&gt;
&lt;li&gt;patients in hospitals&lt;/li&gt;
&lt;li&gt;patients in intensive care&lt;/li&gt;
&lt;li&gt;new confirmed cases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;at the province and national level.&lt;/p&gt;
&lt;p&gt;Data is from &lt;a href=&#34;https://epistat.wiv-isp.be/covid/&#34; target=&#34;_blank&#34;&gt;Sciensano&lt;/a&gt; and all plots were created with the &lt;a href=&#34;https://statsandr.com/blog/graphics-in-r-with-ggplot2/&#34;&gt;&lt;code&gt;{ggplot2}&lt;/code&gt; package&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;new-hospital-admissions&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;New hospital admissions&lt;/h1&gt;
&lt;div id=&#34;overall&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Overall&lt;/h2&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_1.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Belgian hospitalizations COVID-19&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Belgian hospitalizations COVID-19&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;From the above figure, we see that the rate of hospitalizations continue with a decreasing trend in all provinces (and in Belgium as well).&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_1.png&#34;&gt;Download&lt;/a&gt; the figure, or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_twographs.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update of October 27, 2020:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_2710.png&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID19 hospitalizations in Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID19 hospitalizations in Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_2710.png&#34;&gt;Download&lt;/a&gt; the figure, or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_twographs_2710.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The detailed situation in Brabant:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_splitBrabant_2710.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_splitBrabant_2710.png&#34;&gt;Download&lt;/a&gt; the figure, or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_splitBrabant_2710.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;div id=&#34;by-period&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;By period&lt;/h3&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/EvolutionHospitalizations_red2.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Daily COVID19 hospitalizations in Belgium from March to October 2020&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Daily COVID19 hospitalizations in Belgium from March to October 2020&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/EvolutionHospitalizations_red2.png&#34;&gt;Download&lt;/a&gt; the figure, or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/EvolutionProvincesCOVID_v3.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update of November 16, 2020:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/EvolutionHospitalizations_16_11_20.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Daily COVID19 hospitalizations in Belgium by period&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Daily COVID19 hospitalizations in Belgium by period&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/EvolutionHospitalizations_16_11_20.png&#34;&gt;Download&lt;/a&gt; the figure.&lt;/p&gt;
&lt;p&gt;In the first wave, the province of Limburg recorded on average the highest number of COVID19 hospital admissions per million inhabitants. During the second wave, Liège and Hainaut struggled with the highest rates. With two exceptions (Antwerp and Limburg), last month was worse than in March-April. In three provinces (Hainaut, Namur and Liège), the number has more than doubled.&lt;/p&gt;
&lt;p&gt;During the period from June 14 to July 15, 2020, the number of COVID19 hospital admissions in Belgium fell to very low relative levels, but we have failed to maintain them. Now that hospital admissions are no longer increasing, we hope that the colors will lighten up again a bit as the end of the year approaches.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;zooming-in&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Zooming in&lt;/h2&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_3weeks.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Hospital admissions COVID-19 - Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Hospital admissions COVID-19 - Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_3weeks.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_3weeks.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_4weeks_limited.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalisations_COVID-19_4weeks_limited.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_4weeks_limited_1.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update of February 26, 2021:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There is some ongoing debate in Belgium on whether or not to ease restrictions. On February 26, 2021, Belgian authorities will meet, discuss, debate and decide. Current levels and trends of COVID-19 hospitalizations may guide them:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/fig_trends3_1.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;There is still no strong evidence that COVID-19 hospitalization curves decrease in Belgium. The comparison between the first (in gray - dates &amp;amp; curve) and second wave (in blue - dates &amp;amp; curve) needs to be done with care, but indicates that current hospitalization levels are not as low as some may like:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/fig_trends2_2.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;Zooming in provides some additional insights on the COVID-19 levels during the first and second waves at province level:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_2602.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;This shows that the second wave resulted in more hospitalizations than the first one in most Belgian provinces, despite the warning of a first deadly wave. It also illustrates the fact that daily hospitalizations in Belgium are currently still higher than what was observed at the end of the first wave.&lt;/p&gt;
&lt;p&gt;Put simply, the bad news is that the combination of the number of contacts and the risk of transmission by contact seems (at the moment) not sufficiently low to result in a considerable decrease of hospitalizations. Yet (put simply), the good news today is that there is already some immunity in the population and that vaccinations may increase this immunity considerably. This can help in pushing curves down. Let’s not lose hope.&lt;/p&gt;
&lt;p&gt;Download figures (&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/fig_trends3_1.png&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/fig_trends2_2.png&#34;&gt;2&lt;/a&gt; and &lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_2602.png&#34;&gt;3&lt;/a&gt;) or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_twographs_23_02_2021_fr.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update of May 10, 2021:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/covid19-hospitalization-belgium-waves1and2.jpeg&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID19 hospitalizations - Wave 1 and 2&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID19 hospitalizations - Wave 1 and 2&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When looking at the above plot, bad news are that:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;current levels correspond to levels of October 2020 and&lt;/li&gt;
&lt;li&gt;current levels are still about double the target of 75 hospitalizations per day.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are, however, three good news (compared to October 2020):&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;decreasing curve,&lt;/li&gt;
&lt;li&gt;vaccination and&lt;/li&gt;
&lt;li&gt;good weather.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Update of June 4, 2021&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/covid19-hospitalisations-belgium-june4.jpeg&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID-19 hospitalizations in Belgium below 75/day&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID-19 hospitalizations in Belgium below 75/day&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The good news is that the number of COVID-19 hospitalizations in Belgium is now below the well-known threshold of 75 hospitalizations per day (which is a target defined by the Belgian government). This is the way to go, and we hope this trend will continue in the coming days/weeks.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;patients-in-hospitals&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Patients in hospitals&lt;/h1&gt;
&lt;p&gt;Below the evolution of the number of patients in hospitals in Belgium:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_total_2810.png&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID19 patients in hospitals in Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID19 patients in hospitals in Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/Belgian_Hospitalizations_total_2810.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/plot_hosp_trends_divid_twographs_total_2810.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We see that, as of October 28, 2020, the number of COVID19 patients in Belgian hospitals reached the peak of the first wave. So although patients stay shorter at the hospital during the second wave compared to the first wave, hospitals are still getting crowded.&lt;/p&gt;
&lt;p&gt;Therefore, if the number of patients in hospitals follows the same path in the coming weeks, hospitals will quickly become too crowded and will not be able to accept new patients as their maximum capacity will soon be reached (if this is not already the case…).&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;patients-in-intensive-care&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Patients in intensive care&lt;/h1&gt;
&lt;p&gt;Below the evolution of COVID19 patients in intensive care in Belgium, with short-term projections and 99% confidence interval:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/covid19-patients-in-intensive-care-in-belgium.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Evolution of COVID19 patients in intensive care in Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Evolution of COVID19 patients in intensive care in Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/covid19-patients-in-intensive-care-in-belgium.png&#34;&gt;Download&lt;/a&gt; the figure.&lt;/p&gt;
&lt;p&gt;Short-term projections indicate what may have happened without the slow-down in transmission. This slow-down is positive news.&lt;/p&gt;
&lt;p&gt;The maps show total intensive care patients by province if these would have had the Belgian population. Map at the top shows maximum levels in March-April and map at the bottom shows current levels. The maps indicate high intensive care use due to COVID19. In most Belgian provinces, numbers are still higher today than March-April peak numbers.&lt;/p&gt;
&lt;p&gt;Observations are in line with other preliminary indications, such as trends of COVID19 hospitalizations (currently relatively volatile), indicating that transmission is slowing down:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/evolution-covid19-hospital-admissions-belgium.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/evolution-covid19-hospital-admissions-belgium.png&#34;&gt;Download&lt;/a&gt; the figure.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;confirmed-cases&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Confirmed cases&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;Note that the reported number of new confirmed cases is probably underestimated. This number does not take into account undiagnosed (without or with few symptoms) or untested cases. Therefore, figures with number of cases should be interpreted with extreme caution.&lt;/em&gt;&lt;/p&gt;
&lt;div id=&#34;by-province&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;By province&lt;/h2&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/new_cases_divid.png&#34; style=&#34;width:100.0%&#34; alt=&#34;New confirmed COVID-19 cases in Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;New confirmed COVID-19 cases in Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/new_cases_divid.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/new_cases_divid.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;by-age-group-and-sex&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;By age group and sex&lt;/h2&gt;
&lt;div id=&#34;static&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Static&lt;/h3&gt;
&lt;p&gt;Below another visualization of the number of cases by age group and sex in Belgium, for three different periods:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-limit.png&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID-19 cases by age group and sex in Belgium&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID-19 cases by age group and sex in Belgium&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-limit.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/pyramid-plot-week.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This visualization shows the importance to report ages of cases and not just total number.&lt;/p&gt;
&lt;p&gt;Moreover, we see that the distribution of cases per week by age group at the beginning of September is similar than during the summer holidays, but the number of cases per week is higher. The distribution of cases per week by age group at the beginning of September is however different from the “first wave” (period from March 1, 2020 to May 31, 2020). During the fist period, majority of cases were elderly, while at the beginning of September majority of cases are young people. It would be interesting to see how the distribution of cases by age group evolves during winter.&lt;/p&gt;
&lt;p&gt;The figure above may be put in relation with the structure of the Belgian population:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-population.png&#34; style=&#34;width:100.0%&#34; alt=&#34;Structure of Belgian population (2019)&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Structure of Belgian population (2019)&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-population.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/pyramid-plot-population.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;dynamic&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;Dynamic&lt;/h3&gt;
&lt;p&gt;Additionally, these can be seen dynamically:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-animated.gif&#34; style=&#34;width:100.0%&#34; alt=&#34;COVID-19 cases by age group and sex in Belgium - dynamic version&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;COVID-19 cases by age group and sex in Belgium - dynamic version&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-animated.gif&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/pyramid-plot-week-animated.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;With an update of the second wave:&lt;/p&gt;
&lt;div class=&#34;float&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-animated-incidence.gif&#34; style=&#34;width:100.0%&#34; alt=&#34;Age and sex specific incidence per 100 000 of COVID19 cases in Belgium - dynamic version&#34; /&gt;
&lt;div class=&#34;figcaption&#34;&gt;Age and sex specific incidence per 100 000 of COVID19 cases in Belgium - dynamic version&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot-week-animated-incidence.gif&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/pyramid-plot-week-animated.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;by-age-group-sex-and-province&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;By age group, sex and province&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot_facets_incidence_week.png&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://statsandr.com/blog/2020-05-22-covid-19-in-belgium-is-it-over-yet_files/pyramid-plot_facets_incidence_week.png&#34;&gt;Download&lt;/a&gt; the figure or see the &lt;a href=&#34;https://github.com/AntoineSoetewey/COVID-19-Figures/blob/master/pyramid-plot_facets_incidence_week.R&#34; target=&#34;_blank&#34;&gt;code&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;conclusion&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;
&lt;p&gt;We hope that these figures will evolve in the right direction. In the meantime, take care and stay safe!&lt;/p&gt;
&lt;p&gt;If you would like to be further updated on the evolution of the COVID-19 epidemic, two options:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;visit the blog from time to time, and&lt;/li&gt;
&lt;li&gt;join Twitter and follow us: &lt;a href=&#34;https://twitter.com/statsandr&#34; target=&#34;_blank&#34;&gt;statsandr&lt;/a&gt;, &lt;a href=&#34;https://twitter.com/NikoSpeybroeck&#34; target=&#34;_blank&#34;&gt;NikoSpeybroeck&lt;/a&gt; &amp;amp; &lt;a href=&#34;https://twitter.com/arosas_aguirre&#34; target=&#34;_blank&#34;&gt;arosas_aguirre&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As always, if you have a question or a suggestion related to the topic covered in this article, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;/div&gt;
</description>
    </item>
    
    <item>
      <title>COVID-19 in Belgium</title>
      <link>https://statsandr.com/blog/covid-19-in-belgium/</link>
      <pubDate>Tue, 31 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>https://statsandr.com/blog/covid-19-in-belgium/</guid>
      <description>

&lt;div id=&#34;TOC&#34;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#top-r-resources-on-coronavirus&#34;&gt;Top R resources on Coronavirus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#coronavirus-dashboard-for-your-own-country&#34;&gt;Coronavirus dashboard for your own country&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#motivations-limitations-and-structure-of-the-article&#34;&gt;Motivations, limitations and structure of the article&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#analysis-of-coronavirus-in-belgium&#34;&gt;Analysis of Coronavirus in Belgium&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#a-classic-epidemiological-model-the-sir-model&#34;&gt;A classic epidemiological model: the &lt;em&gt;SIR&lt;/em&gt; model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#fitting-a-sir-model-to-the-belgium-data&#34;&gt;Fitting a &lt;em&gt;SIR&lt;/em&gt; model to the Belgium data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#reproduction-number-r_0&#34;&gt;Reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#using-our-model-to-analyze-the-outbreak-if-there-was-no-intervention&#34;&gt;Using our model to analyze the outbreak if there was no intervention&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#more-summary-statistics&#34;&gt;More summary statistics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#additional-considerations&#34;&gt;Additional considerations&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#ascertainment-rates&#34;&gt;Ascertainment rates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#more-sophisticated-models&#34;&gt;More sophisticated models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#modelling-the-epidemic-trajectory-using-log-linear-models&#34;&gt;Modelling the epidemic trajectory using log-linear models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#estimating-changes-in-the-effective-reproduction-number-r_e&#34;&gt;Estimating changes in the effective reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_e\)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#more-sophisticated-projections&#34;&gt;More sophisticated projections&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#conclusion&#34;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#references&#34;&gt;References&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/Covid-19%20in%20Belgium.jpeg&#34; style=&#34;width:100.0%&#34; /&gt;&lt;/p&gt;
&lt;div id=&#34;introduction&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;The Novel COVID-19 Coronavirus is still spreading quickly in several countries and it does not seem like it is going to stop anytime soon as the peak has not yet been reached in many countries.&lt;/p&gt;
&lt;p&gt;Since the beginning of its expansion, a large number of scientists across the world have been analyzing this Coronavirus from different perspectives and with different technologies with the hope of coming up with a cure in order to stop its expansion and limit its impact on citizens.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;top-r-resources-on-coronavirus&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Top R resources on Coronavirus&lt;/h1&gt;
&lt;p&gt;In the meantime, epidemiologists, statisticians and data scientists are working towards a better understanding of the spread of the virus in order to help governments and health agencies in taking the most optimal decisions. This led to the publication of a great deal of online resources about the virus, which I collected and organized in an article covering the &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/&#34;&gt;top R resources on Coronavirus&lt;/a&gt;. This article is a collection of the best resources I’ve had the chance to discover, with a brief summary for each of them. It includes Shiny apps, dashboards, R packages, blog posts and datasets.&lt;/p&gt;
&lt;p&gt;Publishing this collection led many readers to submit their piece of work, which made the article even more complete and more insightful for anyone interested in analyzing the virus from a quantitative perspective. Thanks to everyone who contributed and who helped me in collecting and summarizing these R resources about COVID-19!&lt;/p&gt;
&lt;p&gt;Given my field of expertise, I am not able to help in this fight against the virus from a medical point of view. However, I still wanted to contribute as much as I could. From understanding better the disease to bringing scientists and doctors together to build something bigger and more impactful, I truly hope that this collection will, to a small extent, help to fight the pandemic.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;coronavirus-dashboard-for-your-own-country&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Coronavirus dashboard for your own country&lt;/h1&gt;
&lt;p&gt;Besides receiving analyses, blog posts, R code and Shiny apps from people across the world, I realized that many people were trying to create a dashboard tracking the spread of the Coronavirus for their own country. So in addition to the collection of top R resources, I also published an article detailing the steps to follow to create a dashboard specific to a country. See how to create such dashboard in this &lt;a href=&#34;https://statsandr.com/blog/how-to-create-a-simple-coronavirus-dashboard-specific-to-your-country-in-r/&#34;&gt;article&lt;/a&gt; and an &lt;a href=&#34;https://www.antoinesoetewey.com/files/coronavirus-dashboard.html&#34; target=&#34;_blank&#34;&gt;example with Belgium&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The code has been made available on GitHub and is open source so everyone can copy it and adapt it to their own country. The dashboard was intentionally kept simple so anyone with a minimum knowledge in R could easily replicate it, and advanced users could enhance it according to their needs.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;motivations-limitations-and-structure-of-the-article&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Motivations, limitations and structure of the article&lt;/h1&gt;
&lt;p&gt;By seeing and organizing many &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/&#34;&gt;R resources about COVID-19&lt;/a&gt;, I am fortunate enough to have read a lot of excellent analyses on the disease outbreak, the impact of different health measures, forecasts of the number of cases, projections about the length of the pandemic, hospitals capacity, etc.&lt;/p&gt;
&lt;p&gt;Furthermore, I must admit that some countries such as China, South Korea, Italy, Spain, UK and Germany received a lot of attention as shown by the number of analyses done on these countries. However, to my knowledge and at the date of publication of this article, I am not aware of any analysis of the spread of the Coronavirus specifically for Belgium.&lt;a href=&#34;#fn1&#34; class=&#34;footnote-ref&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; The present article aims at filling that gap.&lt;/p&gt;
&lt;p&gt;Throughout my PhD thesis in statistics, my main research interest is about survival analysis applied to cancer patients (more information in the research section of my &lt;a href=&#34;https://www.antoinesoetewey.com/research/&#34; target=&#34;_blank&#34;&gt;personal website&lt;/a&gt;). I am not an epidemiologist and I have no extensive knowledge in modelling disease outbreaks via epidemiological models.&lt;/p&gt;
&lt;p&gt;I usually write articles only about things I consider myself familiar with, mainly &lt;a href=&#34;https://statsandr.com/tags/statistics/&#34;&gt;statistics&lt;/a&gt; and its applications in &lt;a href=&#34;https://statsandr.com/tags/r/&#34;&gt;R&lt;/a&gt;. At the time of writing this article, I was however curious where Belgium stands regarding the spread of this virus, I wanted to play with this kind of data in R (which is new to me) and see what comes out.&lt;/p&gt;
&lt;p&gt;In order to satisfy my curiosity while not being an expert, in this article I am going to replicate analyses done by more knowledgeable people and apply them to my country, that is, Belgium. From all the analyses I have read so far, I decided to replicate the analyses done by Tim Churches and Prof. Dr. Holger K. von Jouanne-Diedrich. This article is based on a mix of their articles which can be found &lt;a href=&#34;https://timchurches.github.io/blog/posts/2020-02-18-analysing-covid-19-2019-ncov-outbreak-data-with-r-part-1/&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://blog.ephorie.de/epidemiology-how-contagious-is-novel-coronavirus-2019-ncov&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;. They both present a very informative analysis on how to model the outbreak of the Coronavirus and show how contagious it is. Their articles also allowed me to gain an understanding of the topic and in particular an understanding of the most common epidemiological model. I strongly advise interested readers to also read their &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/#analyzing-covid-19-outbreak-data-with-r&#34;&gt;more recent articles&lt;/a&gt; for more advanced analyses and for an even deeper understanding of the spread of the COVID-19 pandemic.&lt;/p&gt;
&lt;p&gt;Other more &lt;a href=&#34;https://statsandr.com/blog/covid-19-in-belgium/#additional-considerations&#34;&gt;complex analyses&lt;/a&gt; are possible and even preferable, but I leave this to experts in this field. Note also that the following analyses take into account only the data until the date of publication of this article, so the results should not be viewed, by default, as current findings.&lt;/p&gt;
&lt;p&gt;In the remaining of the article, we first introduce the model which will be used to analyze the Coronavirus outbreak in Belgium. We also briefly discuss and show how to compute an important epidemiological measure, the reproduction number. We then use our model to analyze the outbreak of the disease in the case where there would be no public health intervention. We conclude the article by summarizing more advanced tools and techniques that could be used to further model COVID-19 in Belgium.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;analysis-of-coronavirus-in-belgium&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Analysis of Coronavirus in Belgium&lt;/h1&gt;
&lt;div id=&#34;a-classic-epidemiological-model-the-sir-model&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;A classic epidemiological model: the &lt;em&gt;SIR&lt;/em&gt; model&lt;/h2&gt;
&lt;p&gt;Before diving into the real-life application, we first introduce the model that will be used.&lt;/p&gt;
&lt;p&gt;There are many epidemiological models but we will use one of the most common one, the &lt;strong&gt;&lt;em&gt;SIR&lt;/em&gt; model&lt;/strong&gt;. The &lt;em&gt;SIR&lt;/em&gt; model can be complexified to incorporate more specificities of the virus outbreak, but in this article we keep its simplest version. Tim Churches’ explanation of this model and how to fit it using R is so nice, I will reproduce it here with a few minor changes.&lt;/p&gt;
&lt;p&gt;The basic idea behind the &lt;em&gt;SIR&lt;/em&gt; model (&lt;strong&gt;S&lt;/strong&gt;usceptible - &lt;strong&gt;I&lt;/strong&gt;nfectious - &lt;strong&gt;R&lt;/strong&gt;ecovered) of communicable disease outbreaks is that there are three groups (also called compartments) of individuals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;S&lt;/em&gt;: those who are healthy but susceptible to the disease (i.e., at risk of being contaminated). At the start of the pandemic, &lt;em&gt;S&lt;/em&gt; is the entire population since no one is immune to the virus.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;I&lt;/em&gt;: the infectious (and thus, infected) people&lt;/li&gt;
&lt;li&gt;&lt;em&gt;R&lt;/em&gt;: individuals who were contaminated but who have either recovered or died. They are not infectious anymore.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These groups evolve over time as the virus progresses in the population:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;S&lt;/em&gt; decreases when individuals are contaminated and move to the infectious group &lt;em&gt;I&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;As people recover or die, they go from the infected group &lt;em&gt;I&lt;/em&gt; to the recovered group &lt;em&gt;R&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To model the dynamics of the outbreak we need three differential equations to describe the rates of change in each group, parameterised by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt;, the infection rate, which controls the transition between &lt;em&gt;S&lt;/em&gt; and &lt;em&gt;I&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt;, the removal or recovery rate, which controls the transition between &lt;em&gt;I&lt;/em&gt; and &lt;em&gt;R&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Formally, this gives:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\frac{dS}{dt} = - \frac{\beta IS}{N} \text{ (Eq. 1)}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\frac{dI}{dt} = \frac{\beta IS}{N} - \gamma I \text{ (Eq. 2)}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[\frac{dR}{dt} = \gamma I \text{ (Eq. 3)}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The first equation (Eq. 1) states that the number of susceptible individuals (&lt;em&gt;S&lt;/em&gt;) decreases with the number of newly infected individuals, where new infected cases are the result of the infection rate (&lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt;) multiplied by the number of susceptible individuals (&lt;em&gt;S&lt;/em&gt;) who had a contact with infectious individuals (&lt;em&gt;I&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;The second equation (Eq. 2) states that the number of infectious individuals (&lt;em&gt;I&lt;/em&gt;) increases with the newly infected individuals (&lt;span class=&#34;math inline&#34;&gt;\(\beta I S\)&lt;/span&gt;), minus the previously infected people who recovered (i.e., &lt;span class=&#34;math inline&#34;&gt;\(\gamma I\)&lt;/span&gt; which is the removal rate &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt; multiplied by the infectious individuals &lt;em&gt;I&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Finally, the last equation (Eq. 3) states that the recovered group (&lt;em&gt;R&lt;/em&gt;) increases with the number of individuals who were infectious and who either recovered or died (&lt;span class=&#34;math inline&#34;&gt;\(\gamma I\)&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;An epidemic develops as follows:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;Before the start of the disease outbreak, &lt;em&gt;S&lt;/em&gt; equals the entire population as no one has anti-bodies.&lt;/li&gt;
&lt;li&gt;At the beginning of the outbreak, as soon as the first individual is infected, &lt;em&gt;S&lt;/em&gt; decreases by 1 and &lt;em&gt;I&lt;/em&gt; increases by 1 as well.&lt;/li&gt;
&lt;li&gt;This first infectious individual contaminates (before recovering or dying) other individuals who were susceptible.&lt;/li&gt;
&lt;li&gt;The dynamic continues, with recently contaminated individuals who in turn infect other susceptible people before they recover.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Visually, we have:&lt;/p&gt;
&lt;div class=&#34;figure&#34;&gt;
&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/SIR-model-covid-19-belgium.png&#34; style=&#34;width:100.0%&#34; alt=&#34;&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;SIR model. Source: Kai Sasaki.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Before fitting the &lt;em&gt;SIR&lt;/em&gt; model to the data, the first step is to express these differential equations as an R function, with respect to time &lt;em&gt;t&lt;/em&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;SIR &amp;lt;- function(time, state, parameters) {
  par &amp;lt;- as.list(c(state, parameters))
  with(par, {
    dS &amp;lt;- -beta * I * S / N
    dI &amp;lt;- beta * I * S / N - gamma * I
    dR &amp;lt;- gamma * I
    list(c(dS, dI, dR))
  })
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;fitting-a-sir-model-to-the-belgium-data&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Fitting a &lt;em&gt;SIR&lt;/em&gt; model to the Belgium data&lt;/h2&gt;
&lt;p&gt;To fit the model to the data we need two things:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;a solver for these differential equations&lt;/li&gt;
&lt;li&gt;an optimiser to find the optimal values for our two unknown parameters, &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The function &lt;code&gt;ode()&lt;/code&gt; (for ordinary differential equations) from the &lt;code&gt;{deSolve}&lt;/code&gt; R package makes solving the system of equations easy, and to find the optimal values for the parameters we wish to estimate, we can just use the &lt;code&gt;optim()&lt;/code&gt; function built into base R.&lt;/p&gt;
&lt;p&gt;Specifically, what we need to do is minimise the sum of the squared differences between &lt;span class=&#34;math inline&#34;&gt;\(I(t)\)&lt;/span&gt;, which is the number of people in the infectious compartment &lt;span class=&#34;math inline&#34;&gt;\(I\)&lt;/span&gt; at time &lt;span class=&#34;math inline&#34;&gt;\(t\)&lt;/span&gt;, and the corresponding number of cases as predicted by our model &lt;span class=&#34;math inline&#34;&gt;\(\hat{I}(t)\)&lt;/span&gt;. This quantity is known as the residual sum of squares (&lt;em&gt;RSS&lt;/em&gt;):&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[RSS(\beta, \gamma) = \sum_t \big(I(t) - \hat{I}(t) \big)^2\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In order to fit a model to the incidence data for Belgium, we need a value &lt;em&gt;N&lt;/em&gt; for the initial uninfected population. The population of Belgium in November 2019 was 11,515,793 people, according to &lt;a href=&#34;https://en.wikipedia.org/wiki/Belgium&#34; target=&#34;_blank&#34;&gt;Wikipedia&lt;/a&gt;. We will thus use &lt;em&gt;N = 11515793&lt;/em&gt; as the initial uninfected population.&lt;/p&gt;
&lt;p&gt;Next, we need to create a vector with the daily cumulative incidence for Belgium, from February 4 (when our daily incidence data starts), through to March 30 (last available date at the time of publication of this article). We will then compare the predicted incidence from the &lt;em&gt;SIR&lt;/em&gt; model fitted to these data with the actual incidence since February 4. We also need to initialise the values for &lt;em&gt;N&lt;/em&gt;, &lt;em&gt;S&lt;/em&gt;, &lt;em&gt;I&lt;/em&gt; and &lt;em&gt;R&lt;/em&gt;. Note that the daily cumulative incidence for Belgium is extracted from the &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/#coronavirus&#34;&gt;&lt;code&gt;{coronavirus}&lt;/code&gt; R package&lt;/a&gt; developed by Rami Krispin.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# devtools::install_github(&amp;quot;RamiKrispin/coronavirus&amp;quot;)
library(coronavirus)
data(coronavirus)

`%&amp;gt;%` &amp;lt;- magrittr::`%&amp;gt;%`

# extract the cumulative incidence
df &amp;lt;- coronavirus %&amp;gt;%
  dplyr::filter(country == &amp;quot;Belgium&amp;quot;) %&amp;gt;%
  dplyr::group_by(date, type) %&amp;gt;%
  dplyr::summarise(total = sum(cases, na.rm = TRUE)) %&amp;gt;%
  tidyr::pivot_wider(
    names_from = type,
    values_from = total
  ) %&amp;gt;%
  dplyr::arrange(date) %&amp;gt;%
  dplyr::ungroup() %&amp;gt;%
  dplyr::mutate(active = confirmed - death - recovered) %&amp;gt;%
  dplyr::mutate(
    confirmed_cum = cumsum(confirmed),
    death_cum = cumsum(death),
    recovered_cum = cumsum(recovered),
    active_cum = cumsum(active)
  )

# put the daily cumulative incidence numbers for Belgium from
# Feb 4 to March 30 into a vector called Infected
library(lubridate)

sir_start_date &amp;lt;- &amp;quot;2020-02-04&amp;quot;
sir_end_date &amp;lt;- &amp;quot;2020-03-30&amp;quot;

Infected &amp;lt;- subset(df, date &amp;gt;= ymd(sir_start_date) &amp;amp; date &amp;lt;= ymd(sir_end_date))$active_cum

# Create an incrementing Day vector the same length as our
# cases vector
Day &amp;lt;- 1:(length(Infected))

# now specify initial values for N, S, I and R
N &amp;lt;- 11515793
init &amp;lt;- c(
  S = N - Infected[1],
  I = Infected[1],
  R = 0
)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Note that what is needed are currently infected persons (cumulative infected minus the removed, i.e. recovered or dead). However, numbers of recovered persons are hard to obtain and probably underestimated due to underreporting bias. I thus consider the &lt;strong&gt;cumulative&lt;/strong&gt; number of infected people, which is probably not an issue here since the number of recovered cases is negligible at the time of the analysis.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Then we need to define a function to calculate the &lt;em&gt;RSS&lt;/em&gt;, given a set of values for &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt;.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# define a function to calculate the residual sum of squares
# (RSS), passing in parameters beta and gamma that are to be
# optimised for the best fit to the incidence data
RSS &amp;lt;- function(parameters) {
  names(parameters) &amp;lt;- c(&amp;quot;beta&amp;quot;, &amp;quot;gamma&amp;quot;)
  out &amp;lt;- ode(y = init, times = Day, func = SIR, parms = parameters)
  fit &amp;lt;- out[, 3]
  sum((Infected - fit)^2)
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, we can fit the &lt;em&gt;SIR&lt;/em&gt; model to our data by finding the values for &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt; that minimise the residual sum of squares between the observed cumulative incidence (observed in Belgium) and the predicted cumulative incidence (predicted by our model). We also need to check that our model has converged, as indicated by the message shown below:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# now find the values of beta and gamma that give the
# smallest RSS, which represents the best fit to the data.
# Start with values of 0.5 for each, and constrain them to
# the interval 0 to 1.0

# install.packages(&amp;quot;deSolve&amp;quot;)
library(deSolve)

Opt &amp;lt;- optim(c(0.5, 0.5),
  RSS,
  method = &amp;quot;L-BFGS-B&amp;quot;,
  lower = c(0, 0),
  upper = c(1, 1)
)

# check for convergence
Opt$message&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] &amp;quot;CONVERGENCE: REL_REDUCTION_OF_F &amp;lt;= FACTR*EPSMCH&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Convergence is confirmed. Note that you may find different estimates for different choices of initial values or constraints. This proves that the fitting process is not stable. Here is a potential &lt;a href=&#34;http://blog.ephorie.de/contagiousness-of-covid-19-part-i-improvements-of-mathematical-fitting-guest-post&#34; target=&#34;_blank&#34;&gt;solution&lt;/a&gt; for a better fitting process.&lt;/p&gt;
&lt;p&gt;Now we can examine the fitted values for &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt;:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;Opt_par &amp;lt;- setNames(Opt$par, c(&amp;quot;beta&amp;quot;, &amp;quot;gamma&amp;quot;))
Opt_par&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##      beta     gamma 
## 0.5841185 0.4158816&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remember that &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; controls the transition between &lt;em&gt;S&lt;/em&gt; and &lt;em&gt;I&lt;/em&gt; (i.e., susceptible and infectious) and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt; controls the transition between &lt;em&gt;I&lt;/em&gt; and &lt;em&gt;R&lt;/em&gt; (i.e., infectious and recovered). However, those values do not mean a lot but we use them to get the fitted numbers of people in each compartment of our &lt;em&gt;SIR&lt;/em&gt; model for the dates up to March 30 that were used to fit the model, and compare those fitted values with the observed (real) data.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# time in days for predictions
t &amp;lt;- 1:as.integer(ymd(sir_end_date) + 1 - ymd(sir_start_date))

# get the fitted values from our SIR model
fitted_cumulative_incidence &amp;lt;- data.frame(ode(
  y = init, times = t,
  func = SIR, parms = Opt_par
))

# add a Date column and the observed incidence data
library(dplyr)
fitted_cumulative_incidence &amp;lt;- fitted_cumulative_incidence %&amp;gt;%
  mutate(
    Date = ymd(sir_start_date) + days(t - 1),
    Country = &amp;quot;Belgium&amp;quot;,
    cumulative_incident_cases = Infected
  )

# plot the data
library(ggplot2)
fitted_cumulative_incidence %&amp;gt;%
  ggplot(aes(x = Date)) +
  geom_line(aes(y = I), colour = &amp;quot;red&amp;quot;) +
  geom_point(aes(y = cumulative_incident_cases), colour = &amp;quot;blue&amp;quot;) +
  labs(
    y = &amp;quot;Cumulative incidence&amp;quot;,
    title = &amp;quot;COVID-19 fitted vs observed cumulative incidence, Belgium&amp;quot;,
    subtitle = &amp;quot;(Red = fitted from SIR model, blue = observed)&amp;quot;
  ) +
  theme_minimal()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/figure-html/unnamed-chunk-6-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;From the above graph we see that the number of observed confirmed cases follows (unfortunately) the number of confirmed cases expected by our model. The fact that both trends are overlapping indicates that the pandemic is clearly in an exponential phase in Belgium. More data would be needed to see whether this trend is confirmed in the long term.&lt;/p&gt;
&lt;p&gt;The following graph is similar than the previous one, except that the &lt;em&gt;y&lt;/em&gt;-axis is measured on a log scale. This kind of plot is called a semi-log plot or more precisely a log-linear plot because only the &lt;em&gt;y&lt;/em&gt;-axis is transformed with a logarithm scale. Transforming the scale in log has the advantage that it is more easily readable in terms of difference between the observed and expected number of confirmed cases and it also shows how the number of observed confirmed cases differs from an exponential trend.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fitted_cumulative_incidence %&amp;gt;%
  ggplot(aes(x = Date)) +
  geom_line(aes(y = I), colour = &amp;quot;red&amp;quot;) +
  geom_point(aes(y = cumulative_incident_cases), colour = &amp;quot;blue&amp;quot;) +
  labs(
    y = &amp;quot;Cumulative incidence&amp;quot;,
    title = &amp;quot;COVID-19 fitted vs observed cumulative incidence, Belgium&amp;quot;,
    subtitle = &amp;quot;(Red = fitted from SIR model, blue = observed)&amp;quot;
  ) +
  theme_minimal() +
  scale_y_log10(labels = scales::comma)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/figure-html/unnamed-chunk-7-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The plot indicates that, at the beginning of the pandemic and until March 12, the number of confirmed cases stayed below what would be expected in an exponential phase. In particular, the number of confirmed cases stayed constant at 1 case from February 4 to February 29. From March 13 and until March 30, the number of confirmed cases kept increasing at a rate close to an exponential rate.&lt;/p&gt;
&lt;p&gt;We also notice a small jump between March 12 and March 13, which may potentially indicate an error in the data collection, or a change in the testing/screening methods.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;reproduction-number-r_0&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Our &lt;em&gt;SIR&lt;/em&gt; model looks like a good fit to the observed cumulative incidence data in Belgium, so we can now use our fitted model to calculate the basic reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt;, also referred as basic reproduction ratio, and which is closely linked to &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt;.&lt;a href=&#34;#fn2&#34; class=&#34;footnote-ref&#34; id=&#34;fnref2&#34;&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The basic reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; gives the average number of susceptible people who are infected by each infectious person where all individuals are susceptible to infection. In other words, the reproduction number refers to the number of healthy people that get infected per number of sick people. When &lt;span class=&#34;math inline&#34;&gt;\(R_0 &amp;gt; 1\)&lt;/span&gt; the disease starts spreading in a population, but not if &lt;span class=&#34;math inline&#34;&gt;\(R_0 &amp;lt; 1\)&lt;/span&gt;. Usually, the larger the value of &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt;, the harder it is to control the epidemic and the higher the probability of a pandemic.&lt;/p&gt;
&lt;p&gt;Formally, we have:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[R_0 = \frac{\beta}{\gamma}\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We can compute it in R:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;Opt_par&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##      beta     gamma 
## 0.5841185 0.4158816&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;R0 &amp;lt;- as.numeric(Opt_par[1] / Opt_par[2])
R0&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] 1.404531&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; of 1.4 is below values found by others for COVID-19 and the &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; for SARS and MERS, which are similar diseases also caused by coronavirus. Furthermore, in the literature, it has been estimated that the reproduction number for COVID-19 is approximately 2.7 (with &lt;span class=&#34;math inline&#34;&gt;\(\beta\)&lt;/span&gt; close to 0.54 and &lt;span class=&#34;math inline&#34;&gt;\(\gamma\)&lt;/span&gt; close to 0.2). Our reproduction number being lower is mainly due to the fact that the number of confirmed cases stayed constant and equal to 1 at the beginning of the pandemic.&lt;/p&gt;
&lt;p&gt;A &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; of 1.4 means that, on average in Belgium, 1.4 persons are infected for each infected person.&lt;/p&gt;
&lt;p&gt;For simple models, the proportion of the population that needs to be effectively immunized to prevent sustained spread of the disease, known as the “herd immunity threshold”, has to be larger than &lt;span class=&#34;math inline&#34;&gt;\(1 - \frac{1}{R_0}\)&lt;/span&gt; &lt;span class=&#34;citation&#34;&gt;(Fine, Eames, and Heymann &lt;a href=&#34;#ref-fine2011herd&#34; role=&#34;doc-biblioref&#34;&gt;2011&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;!-- Under some conditions, $1 - \frac{1}{R_0}$ gives an indication about the proportion of the population likely to be infected throughout the pandemic. --&gt;
&lt;p&gt;The reproduction number of 1.4 we just calculated suggests that, given the formula 1 - (1 / 1.4), 28.8% of the population should be immunized to stop the spread of the infection. With a population in Belgium of approximately 11.5 million, this translates into roughly 3.3 million people.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;using-our-model-to-analyze-the-outbreak-if-there-was-no-intervention&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Using our model to analyze the outbreak if there was no intervention&lt;/h2&gt;
&lt;p&gt;It is instructive to use our model fitted to the first 56 days of available data on confirmed cases in Belgium, to see what would happen if the outbreak were left to run its course, without public health intervention.&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# time in days for predictions
t &amp;lt;- 1:120

# get the fitted values from our SIR model
fitted_cumulative_incidence &amp;lt;- data.frame(ode(
  y = init, times = t,
  func = SIR, parms = Opt_par
))

# add a Date column and join the observed incidence data
fitted_cumulative_incidence &amp;lt;- fitted_cumulative_incidence %&amp;gt;%
  mutate(
    Date = ymd(sir_start_date) + days(t - 1),
    Country = &amp;quot;Belgium&amp;quot;,
    cumulative_incident_cases = c(Infected, rep(NA, length(t) - length(Infected)))
  )

# plot the data
fitted_cumulative_incidence %&amp;gt;%
  ggplot(aes(x = Date)) +
  geom_line(aes(y = I), colour = &amp;quot;red&amp;quot;) +
  geom_line(aes(y = S), colour = &amp;quot;black&amp;quot;) +
  geom_line(aes(y = R), colour = &amp;quot;green&amp;quot;) +
  geom_point(aes(y = cumulative_incident_cases),
    colour = &amp;quot;blue&amp;quot;
  ) +
  scale_y_continuous(labels = scales::comma) +
  labs(y = &amp;quot;Persons&amp;quot;, title = &amp;quot;COVID-19 fitted vs observed cumulative incidence, Belgium&amp;quot;) +
  scale_colour_manual(name = &amp;quot;&amp;quot;, values = c(
    red = &amp;quot;red&amp;quot;, black = &amp;quot;black&amp;quot;,
    green = &amp;quot;green&amp;quot;, blue = &amp;quot;blue&amp;quot;
  ), labels = c(
    &amp;quot;Susceptible&amp;quot;,
    &amp;quot;Recovered&amp;quot;, &amp;quot;Observed&amp;quot;, &amp;quot;Infectious&amp;quot;
  )) +
  theme_minimal()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/figure-html/unnamed-chunk-10-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;p&gt;The same graph in log scale for the &lt;em&gt;y&lt;/em&gt;-axis and with a legend for better readability:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# plot the data
fitted_cumulative_incidence %&amp;gt;%
  ggplot(aes(x = Date)) +
  geom_line(aes(y = I, colour = &amp;quot;red&amp;quot;)) +
  geom_line(aes(y = S, colour = &amp;quot;black&amp;quot;)) +
  geom_line(aes(y = R, colour = &amp;quot;green&amp;quot;)) +
  geom_point(aes(y = cumulative_incident_cases, colour = &amp;quot;blue&amp;quot;)) +
  scale_y_log10(labels = scales::comma) +
  labs(
    y = &amp;quot;Persons&amp;quot;,
    title = &amp;quot;COVID-19 fitted vs observed cumulative incidence, Belgium&amp;quot;
  ) +
  scale_colour_manual(
    name = &amp;quot;&amp;quot;,
    values = c(red = &amp;quot;red&amp;quot;, black = &amp;quot;black&amp;quot;, green = &amp;quot;green&amp;quot;, blue = &amp;quot;blue&amp;quot;),
    labels = c(&amp;quot;Susceptible&amp;quot;, &amp;quot;Observed&amp;quot;, &amp;quot;Recovered&amp;quot;, &amp;quot;Infectious&amp;quot;)
  ) +
  theme_minimal()&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&#34;https://statsandr.com/blog/2020-03-31-covid-19-in-belgium_files/figure-html/unnamed-chunk-11-1.png&#34; width=&#34;100%&#34; style=&#34;display: block; margin: auto;&#34; /&gt;&lt;/p&gt;
&lt;div id=&#34;more-summary-statistics&#34; class=&#34;section level3&#34;&gt;
&lt;h3&gt;More summary statistics&lt;/h3&gt;
&lt;p&gt;Other interesting statistics can be computed from the fit of our model. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the peak of the pandemic&lt;/li&gt;
&lt;li&gt;the number of severe cases&lt;/li&gt;
&lt;li&gt;the number of people in need of intensive care&lt;/li&gt;
&lt;li&gt;the number of deaths&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;fit &amp;lt;- fitted_cumulative_incidence

# peak of pandemic
fit[fit$I == max(fit$I), c(&amp;quot;Date&amp;quot;, &amp;quot;I&amp;quot;)]&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##          Date        I
## 89 2020-05-02 531000.4&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# severe cases
max_infected &amp;lt;- max(fit$I)
max_infected * 0.2&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] 106200.1&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# cases with need for intensive care
max_infected * 0.06&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] 31860.03&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;# deaths with supposed 4.5% fatality rate
max_infected * 0.045&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;## [1] 23895.02&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Given these predictions, with the exact same settings and no intervention at all to limit the spread of the pandemic, the peak in Belgium is expected to be reached by the beginning of May. About 530,000 people would be infected by then, which translates to about 106,000 severe cases, about 32,000 persons in need of intensive care (given that there are about 2000 intensive care units in Belgium, the health sector would be completely overwhelmed) and up to 24,000 deaths (assuming a 4.5% fatality rate, as suggested by this &lt;a href=&#34;https://learning-from-the-curve.github.io/epidemic-models/2020/04/13/COVID-SIR.html&#34; target=&#34;_blank&#34;&gt;source&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;At this point, we understand why such strict containment measures and regulations are taken in Belgium!&lt;/p&gt;
&lt;p&gt;Note that those predictions should be taken with a lot of caution. On the one hand, as mentioned above, they are based on rather unrealistic assumptions (for example, no public health interventions, fixed reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt;, etc.). More advanced projections are possible with the &lt;code&gt;{projections}&lt;/code&gt; package, among others (see this &lt;a href=&#34;https://statsandr.com/blog/covid-19-in-belgium/#more-sophisticated-projections&#34;&gt;section&lt;/a&gt; for more information on this matter). On the other hand, we still have to be careful and strictly follow public health interventions because previous pandemics such as the Spanish and swine flu have shown that incredibly high numbers are not impossible!&lt;/p&gt;
&lt;p&gt;The purpose of this article was to give an illustration of how such analyses are done in R with a simple epidemiological model. Those are the numbers our simple model produces and we hope they are wrong because the cost in terms of lives would be enormous.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;additional-considerations&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Additional considerations&lt;/h1&gt;
&lt;p&gt;As previously mentioned, the &lt;em&gt;SIR&lt;/em&gt; model and the analyses done above are rather simplistic and may not give a true representation of the reality. In the following sections, we highlight five improvements that could be done to enhance theses analyses and lead to a better overview of the spread of the Coronavirus in Belgium.&lt;/p&gt;
&lt;div id=&#34;ascertainment-rates&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Ascertainment rates&lt;/h2&gt;
&lt;p&gt;In the previous analyses and graphs, it is assumed that the number of confirmed cases represent all the cases that are infectious. This is far from reality as only a proportion of all cases are screened, detected and counted in the official figures. This proportion is known as the ascertainment rate.&lt;/p&gt;
&lt;p&gt;The ascertainment rate is likely to vary during the course of an outbreak, in particular if testing and screening efforts are increased, or if detections methods are changed. Such changing ascertainment rates can be easily incorporated into the model by using a weighting function for the incidence cases.&lt;/p&gt;
&lt;p&gt;In his first &lt;a href=&#34;https://timchurches.github.io/blog/posts/2020-02-18-analysing-covid-19-2019-ncov-outbreak-data-with-r-part-1/&#34; target=&#34;_blank&#34;&gt;article&lt;/a&gt;, Tim Churches demonstrates that a fixed ascertainment rates of 20% makes little difference to the modelled outbreak with no intervention, except that it all happens a bit more quickly.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;more-sophisticated-models&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;More sophisticated models&lt;/h2&gt;
&lt;p&gt;More sophisticated models could also be used to better reflect real-life transmission processes. For instance, another classical model in disease outbreak is the &lt;em&gt;SEIR&lt;/em&gt; model. This extended model is similar to the &lt;em&gt;SIR&lt;/em&gt; model, where &lt;strong&gt;S&lt;/strong&gt; stands for &lt;strong&gt;S&lt;/strong&gt;usceptible and &lt;strong&gt;R&lt;/strong&gt; stands for &lt;strong&gt;R&lt;/strong&gt;ecovered, but the infected people are divided into two compartments:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;&lt;strong&gt;E&lt;/strong&gt; for the &lt;strong&gt;E&lt;/strong&gt;xposed/infected but asymptomatic&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;I&lt;/strong&gt; for the &lt;strong&gt;I&lt;/strong&gt;nfected and symptomatic&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These models belong to the continuous-time dynamic models that assume fixed transition rates. There are other stochastic models that allow for varying transition rates depending on attributes of individuals, social networking, etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;modelling-the-epidemic-trajectory-using-log-linear-models&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Modelling the epidemic trajectory using log-linear models&lt;/h2&gt;
&lt;p&gt;As noted above, the initial exponential phase of an outbreak, when shown in a log-linear plot (the &lt;em&gt;y&lt;/em&gt;-axis on a log scale and the &lt;em&gt;x&lt;/em&gt;-axis without transformation), appears (somewhat) linear. This suggests that we can model epidemic growth, and decay, using a simple log-linear model of the form:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[log(y)=rt+b\]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;where &lt;em&gt;y&lt;/em&gt; is the incidence, &lt;em&gt;r&lt;/em&gt; is the growth rate, &lt;em&gt;t&lt;/em&gt; is the number of days since a specific point in time (typically the start of the outbreak), and &lt;em&gt;b&lt;/em&gt; is the intercept. In this context, two log-linear models:&lt;/p&gt;
&lt;ol style=&#34;list-style-type: decimal&#34;&gt;
&lt;li&gt;one to the growth phase (before the peak), and&lt;/li&gt;
&lt;li&gt;one to the decay phase (after the peak)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;are fitted to the epidemic (incidence cases) curve.&lt;/p&gt;
&lt;p&gt;The doubling and halving time estimates which you very often hear in the news can be estimated from these log-linear models. Furthermore, these log-linear models can also be used on the epidemic trajectory to estimate the reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; in the growth and decay phases of the epidemic.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;{incidence}&lt;/code&gt; package in R, part of the &lt;a href=&#34;https://www.repidemicsconsortium.org/&#34; target=&#34;_blank&#34;&gt;R Epidemics Consortium (RECON)&lt;/a&gt; suite of packages for epidemic modelling and control, makes the fitting of this kind of models very convenient.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;estimating-changes-in-the-effective-reproduction-number-r_e&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Estimating changes in the effective reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_e\)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;In our model, we set a reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_0\)&lt;/span&gt; and kept it constant. It would nonetheless be useful to estimate the current effective reproduction number &lt;span class=&#34;math inline&#34;&gt;\(R_e\)&lt;/span&gt; on a day-by-day basis so as to track the effectiveness of public health interventions, and possibly predict when an incidence curve will start to decrease.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;{EpiEstim}&lt;/code&gt; package in R can be used to estimate &lt;span class=&#34;math inline&#34;&gt;\(R_e\)&lt;/span&gt; and allow to take into consideration human travel from other geographical regions in addition to local transmission &lt;span class=&#34;citation&#34;&gt;(Cori et al. &lt;a href=&#34;#ref-cori2013new&#34; role=&#34;doc-biblioref&#34;&gt;2013&lt;/a&gt;; Thompson et al. &lt;a href=&#34;#ref-thompson2019improved&#34; role=&#34;doc-biblioref&#34;&gt;2019&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;more-sophisticated-projections&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;More sophisticated projections&lt;/h2&gt;
&lt;p&gt;In addition to naïve predictions based on a simple &lt;em&gt;SIR&lt;/em&gt; model, more advanced and complex projections are also possible, notably, with the &lt;code&gt;{projections}&lt;/code&gt; package. This packages uses data on daily incidence, the serial interval and the reproduction number to simulate plausible epidemic trajectories and project future incidence.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;conclusion&#34; class=&#34;section level1&#34;&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;This article started with (i) a description of a couple of R resources on the Coronavirus pandemic (i.e., a &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/&#34;&gt;collection&lt;/a&gt; and a &lt;a href=&#34;https://statsandr.com/blog/how-to-create-a-simple-coronavirus-dashboard-specific-to-your-country-in-r/&#34;&gt;dashboard&lt;/a&gt;) that can be used as background materials and (ii) the motivations behind this article. We then detailed the most common epidemiological model, i.e. the &lt;em&gt;SIR&lt;/em&gt; model, before actually applying it on Belgium incidence data.&lt;/p&gt;
&lt;p&gt;This resulted in a visual comparison of the fitted and observed cumulative incidence in Belgium. It showed that the COVID-19 pandemic is clearly in an exponential phase in Belgium in terms of number of confirmed cases.&lt;/p&gt;
&lt;p&gt;We then explained what is the reproduction number and how to compute it in R. Finally, our model was used to analyze the outbreak of the Coronavirus if there was no public health intervention at all.&lt;/p&gt;
&lt;p&gt;Under this (probably too) simplistic scenario, the peak of the COVID-19 in Belgium is expected to be reached by the beginning of May, 2020, with around 530,000 infected people and about 24,000 deaths. These very alarmist naïve predictions highlight the importance of restrictive public health actions taken by governments, and the urgency for citizens to follow these health actions in order to mitigate the spread of the virus in Belgium (or at least slow it enough to allow health care systems to cope with it).&lt;/p&gt;
&lt;p&gt;We concluded this article by describing five improvements that could be implemented to further analyze the disease outbreak.&lt;/p&gt;
&lt;p&gt;Note that this article has been subject to a &lt;a href=&#34;https://www.antoinesoetewey.com/files/slides-how-can-we-predict-the-evolution-of-covid-19-in-Belgium.pdf&#34; target=&#34;_blank&#34;&gt;talk&lt;/a&gt; at UCLouvain.&lt;/p&gt;
&lt;p&gt;Thanks for reading. I hope this article gave you a good understanding of the spread of the COVID-19 Coronavirus in Belgium. Feel free to use this article as a starting point for analyzing the outbreak of this disease in your own country.&lt;/p&gt;
&lt;p&gt;For the interested readers, see also:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;a href=&#34;https://statsandr.com/blog/covid-19-in-belgium-is-it-over-yet/&#34;&gt;evolution of hospital admissions and number of confirmed cases in Belgium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;a &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/&#34;&gt;collection of top R resources on Coronavirus&lt;/a&gt; to gain even further knowledge&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As always, if you have a question or a suggestion related to the topic covered in this article, please add it as a comment so other readers can benefit from the discussion.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level1 unnumbered&#34;&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;div id=&#34;refs&#34; class=&#34;references&#34;&gt;
&lt;div id=&#34;ref-cori2013new&#34;&gt;
&lt;p&gt;Cori, Anne, Neil M Ferguson, Christophe Fraser, and Simon Cauchemez. 2013. “A New Framework and Software to Estimate Time-Varying Reproduction Numbers During Epidemics.” &lt;em&gt;American Journal of Epidemiology&lt;/em&gt; 178 (9): 1505–12.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;ref-fine2011herd&#34;&gt;
&lt;p&gt;Fine, Paul, Ken Eames, and David L Heymann. 2011. “&#34;Herd Immunity&#34;: A Rough Guide.” &lt;em&gt;Clinical Infectious Diseases&lt;/em&gt; 52 (7): 911–16.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;ref-thompson2019improved&#34;&gt;
&lt;p&gt;Thompson, RN, JE Stockwin, RD van Gaalen, JA Polonsky, ZN Kamvar, PA Demarsh, E Dahlqwist, et al. 2019. “Improved Inference of Time-Varying Reproduction Numbers During Infectious Disease Outbreaks.” &lt;em&gt;Epidemics&lt;/em&gt; 29: 100356.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;Feel free to let me know in the comments or by &lt;a href=&#34;https://statsandr.com/contact/&#34;&gt;contacting me&lt;/a&gt; if you performed some analyses specifically for Belgium and which I could include in my article covering the &lt;a href=&#34;https://statsandr.com/blog/top-r-resources-on-covid-19-coronavirus/&#34;&gt;top R resources on the Coronavirus&lt;/a&gt;.&lt;a href=&#34;#fnref1&#34; class=&#34;footnote-back&#34;&gt;↩︎&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li id=&#34;fn2&#34;&gt;&lt;p&gt;See a more detailed &lt;a href=&#34;https://web.stanford.edu/~jhj1/teachingdocs/Jones-on-R0.pdf&#34; target=&#34;_blank&#34;&gt;note&lt;/a&gt; on the reproduction number by James Holland Jones if you need a deeper understanding.&lt;a href=&#34;#fnref2&#34; class=&#34;footnote-back&#34;&gt;↩︎&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description>
    </item>
    
  </channel>
</rss>