diff --git a/docs/tex/tex_descriptions/models/sm_covid/deaths.tex b/docs/tex/tex_descriptions/models/sm_covid/deaths.tex index 6f402d652..4ec161b95 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/deaths.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/deaths.tex @@ -8,7 +8,7 @@ \end{equation} where $ifr_{a,v,s}$ is the risk of death given infection for age $a$, vaccination status $v$ and strain $s$, and $g_d$ is the probability density function of the statistical distribution chosen to represent the -time from symptom onset to death (\textcolor{red}{See Table XX}). We use a country-specific adjuster $m_C$ to +time from symptom onset to death (Table \ref{param_table}). We use a country-specific adjuster $m_C$ to capture the fact that the infection fatality ratio is expected to vary by country, in part due to differences in COVID-19 death definition and reporting standards. This adjustment is automatically calibrated by the MCMC (Section \ref{calibration}). \ No newline at end of file diff --git a/docs/tex/tex_descriptions/models/sm_covid/hospitalisations.tex b/docs/tex/tex_descriptions/models/sm_covid/hospitalisations.tex index 9dfea4793..3e95315f5 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/hospitalisations.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/hospitalisations.tex @@ -5,7 +5,7 @@ This is why we introduce a universal indicator named ``hospital pressure'' in our analysis. This indicator is obtained by considering the age-specific risk of hospitalisation given infection observed in the first year -of the pandemic in the Netherlands, adjusted for vaccination status and for the infecting strain (\textcolor{red}{See Table XX}). +of the pandemic in the Netherlands, adjusted for vaccination status and for the infecting strain (Table \ref{param_table}). The ``hospital pressure'' indicator can therefore be interpreted as the level of hospital occupancy that would be observed in the analysed country if the rates of hospitalisation given infection in this country were the same as in the Netherlands. This indicator is expected to be roughly proportional to the actual hospital occupancy level of the @@ -20,7 +20,7 @@ \end{equation} where $\kappa_{a,v,s}$ is the risk of hospitalisation given infection for age $a$, vaccination status $v$ and strain $s$ based on the Netherlands data, and $g_h$ is the probability density function of the statistical distribution chosen to represent the -time from symptom onset to hospitalisation (\textcolor{red}{See Table XX}). +time from symptom onset to hospitalisation (Table \ref{param_table}). We then compute the ``hospital pressure'' quantity $h$, which is an indicator of hospital occupancy level, by combining the number of new hospital admissions $\eta$ with the statistical distribution used to model hospital stay duration: @@ -28,4 +28,4 @@ h(t) = \int_{u \geq 0} \eta(t-u) (1 - \tau(u)) du \quad, \end{equation} where $\tau$ is the cumulative density function of the statistical distribution chosen to represent the -hospital stay duration (\textcolor{red}{See Table XX}). +hospital stay duration (Table \ref{param_table}). diff --git a/docs/tex/tex_descriptions/models/sm_covid/mixing.tex b/docs/tex/tex_descriptions/models/sm_covid/mixing.tex index 41cfbb72c..fe64bc4e0 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/mixing.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/mixing.tex @@ -73,7 +73,7 @@ \vspace{5pt} \textbf{Dynamic mobility outside of schools and homes} -Changes to people's mobility in places other than schools and homes are modelled using Google Mobility data. We use the ``Workplace'' +Changes to people's mobility in places other than schools and homes are modelled using Google Mobility data, after applying a seven-day moving average smoothing. We use the ``Workplace'' category of the Google data to scale the work-related matrix contribution $C_W$ to overall mixing over time, using the adjusting function $w$. The ``other locations'' matrix $C_L$ is scaled through the adjusting function $l$ which is defined as the average of the Google mobility indicators across the following Google categories: ``Retail and recreation'', ``Grocery and pharmacy'' and ``Transit stations''. diff --git a/docs/tex/tex_descriptions/models/sm_covid/model_description.tex b/docs/tex/tex_descriptions/models/sm_covid/model_description.tex index a3ed1a053..4ad08dec7 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/model_description.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/model_description.tex @@ -111,6 +111,7 @@ \subsubsection{Ordinary differential equations} \subsubsection{Model parameters} \label{parameters} +\renewcommand{\arraystretch}{1.3} \input{../../tex_descriptions/projects/sm_covid/param_table.tex} % ____________________________________________________ diff --git a/docs/tex/tex_descriptions/models/sm_covid/stratifications/immunity.tex b/docs/tex/tex_descriptions/models/sm_covid/stratifications/immunity.tex index 465acaba4..62495628f 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/stratifications/immunity.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/stratifications/immunity.tex @@ -40,5 +40,5 @@ as well as recovered persons who are at risk of reinfection. The model allows for hybrid immunity in the sense that the vaccination-induced relative reduction of transmission risk is multiplied with that induced by previous infection. Vaccination is also assumed to reduce the risk of hospitalisation and death -Emerging variants of concern (VoCs) may partially escape vaccine-induced (as well as infection-induced) immunity, as described further below (\textcolor{red}{see Section / Table XX}). +Emerging variants of concern (VoCs) may partially escape vaccine-induced (as well as infection-induced) immunity, as described further below (Table \ref{param_table} and \textcolor{red}{Table XXX for cross-immunity}). diff --git a/docs/tex/tex_descriptions/models/sm_covid/stratifications/strains.tex b/docs/tex/tex_descriptions/models/sm_covid/stratifications/strains.tex index 0da68102f..2e8e50037 100644 --- a/docs/tex/tex_descriptions/models/sm_covid/stratifications/strains.tex +++ b/docs/tex/tex_descriptions/models/sm_covid/stratifications/strains.tex @@ -3,8 +3,8 @@ This approach explicitly represents multiple competing strains, each with a separate force of infection calculation. We assume that VoCs can have different levels of transmissibility, incubation period's duration and disease severity (hospitalisation and death risks) compared to the ancestral COVID-19 strain. In addition, VoCs are assumed to escape -immunity partially for both vaccination- and infection-related immunity. The parameters used to represent the VOCs' -characteristics are presented in \textcolor{red}{Table XXX}. +immunity partially for both vaccination- and infection-related immunity. The parameters used to represent strain-specific +characteristics are presented in Table \ref{param_table} and \textcolor{red}{Table XXX for cross-immunity}. Seeding of each new strain into the model is achieved through the importation of a small number (10 per million population) of new infectious persons with the relevant strain into the model. The seeding process is done over a ten-day period and the start of this period is set between 30 days before and 30 days after the emergence date diff --git a/docs/tex/tex_descriptions/projects/sm_covid/agespec_table.tex b/docs/tex/tex_descriptions/projects/sm_covid/agespec_table.tex new file mode 100644 index 000000000..e69de29bb diff --git a/docs/tex/tex_descriptions/projects/sm_covid/calibration_description.tex b/docs/tex/tex_descriptions/projects/sm_covid/calibration_description.tex index 4dd3567e4..f5101a2e6 100644 --- a/docs/tex/tex_descriptions/projects/sm_covid/calibration_description.tex +++ b/docs/tex/tex_descriptions/projects/sm_covid/calibration_description.tex @@ -15,7 +15,7 @@ \section{Model calibration and uncertainty propagation} \subsection{Parameters varied during calibration} The parameters varied during calibration along with their associated prior distributions -are listed in Table (\textcolor{red}{add ref to table here}) and indicated with the superscript \textsuperscript{c}. +are listed in Table \ref{param_table} and indicated with the superscript \textsuperscript{C}. We used uniform prior distributions for all calibrated parameters. The primary parameters varied during calibration are the unadjusted risk of transmission per contact ($\beta$), the IFR multiplier ($m_C$), the infection seeding times of each strain and the proportion of students on-site during ``Partially open'' periods. Note that the values of the random diff --git a/docs/tex/tex_descriptions/projects/sm_covid/param_table.tex b/docs/tex/tex_descriptions/projects/sm_covid/param_table.tex index 6724c4e34..a6a4937df 100644 --- a/docs/tex/tex_descriptions/projects/sm_covid/param_table.tex +++ b/docs/tex/tex_descriptions/projects/sm_covid/param_table.tex @@ -1,9 +1,37 @@ -\begin{tabular}{llll} +\begin{table} +\centering +\caption{Model parameters} +\label{param_table} +\resizebox{\textwidth}{!}{\begin{tabular}{lll} \toprule - Parameter & Value & Unit & Evidence \\ + Parameter & Value/Distribution & Evidence \\ \midrule -Active disease period (mean) & 8.0 & days & - \\ - Incubation period (mean) & 6.57 & days & Citation test \cite{zou-2022} \\ - VE against infection & 0.5 & - & - \\ + Transmission probability per contact \textsuperscript{C} & Uniform (0.01, 0.1) & - \\ + Mean active disease period (days) & 8.0 & - \\ + Country-specific IFR multiplier ($m_C$) \textsuperscript{C} & Uniform (0.5, 1.5) & - \\ + Uncertainty multiplier for school contacts ($m_S$) \textsuperscript{C} & Uniform (0.8, 1.2) & assumed \\ +Prop. students on-site during “Partially open” periods \textsuperscript{C} & Uniform (0.1, 0.3) & assumed \\ + VE against infection & 0.5 & - \\ + VE against hospitalisation & 0.9 & - \\ + VE against death & 0.9 & - \\ + Time from symptom onset to hospitalisation (days) & Gamma (shape=5, mean=7.7) & ISARIC report 4th Oct 2020 (Mendeley citation key Pritchard2020) \\ + Hospital stay duration (days) & Gamma (shape=5, mean=12.8) & ISARIC report 4th Oct 2020 (Mendeley citation key Pritchard2020) \\ + Time from symptom onset to death (days) & Gamma (shape=10, mean=15.93) & Malahat Khalili et al. . https://doi.org/10.1017/S0950268820001430 \\ + \textbf{Strain-specific parameters} & & \\ + \quad \textit{Wild-type strain} & & \\ + Mean incubation period (days) & 6.65 & Wu et al. doi:10.1001/jamanetworkopen.2022.28008 \\ + \quad \textit{Delta variant} & & \\ + Mean incubation period (days) & 4.41 & Wu et al. doi:10.1001/jamanetworkopen.2022.28008 \\ + Relative intrinsic transmissibility (ref. wild-type) & 1.38 & DOI: 10.1503/cmaj.211248 \\ + Relative risk of hospitalisation (ref. wild-type) & 2.1 & Fisman et al. doi: 10.1503/cmaj.211248 \\ + Relative risk of death (ref. wild-type) & 2.3 & Fisman et al. doi: 10.1503/cmaj.211248 \\ + Prop. escaping vaccine immunity against infection & 0.32 & DOI: 10.1503/cmaj.211248 \\ + \quad \textit{Omicron variant} & & \\ + Mean incubation period (days) & 3.42 & Wu et al. doi:10.1001/jamanetworkopen.2022.28008 \\ + Relative intrinsic transmissibility (ref. wild-type) & 1.92 & DOI: 10.1503/cmaj.211248 \\ + Relative risk of hospitalisation (ref. wild-type) & 0.861 & Nyberg doi.org/10.1016/S0140-6736(22)00462-7 \\ + Relative risk of death (ref. wild-type) & 0.713 & Nyberg doi.org/10.1016/S0140-6736(22)00462-7 \\ + Prop. escaping vaccine immunity against infection & 0.55 & DOI: 10.1503/cmaj.211248 \\ \bottomrule -\end{tabular} +\end{tabular}} +\end{table} diff --git a/docs/tex/user/rragonnet/sm_covid.pdf b/docs/tex/user/rragonnet/sm_covid.pdf index ee032b004..4bb4bd6a9 100644 Binary files a/docs/tex/user/rragonnet/sm_covid.pdf and b/docs/tex/user/rragonnet/sm_covid.pdf differ diff --git a/notebooks/user/rragonnet/project_specific/School_Closure/param_tables.ipynb b/notebooks/user/rragonnet/project_specific/School_Closure/param_tables.ipynb index 3cae51aff..8ca781d34 100644 --- a/notebooks/user/rragonnet/project_specific/School_Closure/param_tables.ipynb +++ b/notebooks/user/rragonnet/project_specific/School_Closure/param_tables.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 441, "metadata": {}, "outputs": [], "source": [ @@ -15,7 +15,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 442, "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 443, "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 444, "metadata": {}, "outputs": [], "source": [ @@ -46,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 445, "metadata": {}, "outputs": [], "source": [ @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 446, "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 447, "metadata": {}, "outputs": [], "source": [ @@ -86,21 +86,37 @@ " params_df = copy(params_info)\n", "\n", " for index in params_df.index:\n", - " if params_df.loc[index, 'value'] == \"LOAD\":\n", - " p_name = params_df.loc[index, 'param_key']\n", + " p_name = params_df.loc[index, 'param_key']\n", + " value = params_df.loc[index, 'value']\n", + " if value == \"LOAD\":\n", " if p_name in bcm.priors:\n", " p = bcm.priors[p_name]\n", " displayed_value = p.__repr__().replace(\"UniformPrior bounds:\", \"Uniform\")\n", " else:\n", " displayed_value = get_param_val(p_name, model_params)\n", " params_df.loc[index, 'value'] = displayed_value\n", + " elif value in (\"HEADER\", \"SUBHEADER\"):\n", + " params_df.loc[index, 'value'] = \"\"\n", + " params_df.loc[index, 'unit'] = \"\"\n", + " params_df.loc[index, 'evidence'] = \"\"\n", + "\n", + " header_name = params_df.loc[index, 'legible_name']\n", + " if value == \"HEADER\":\n", + " params_df.loc[index, 'legible_name'] = f\"BEGINBOLD{header_name}ENDBOLD\"\n", + " else: # \"SUBHEADER\"\n", + " params_df.loc[index, 'legible_name'] = f\"BEGINITAL{header_name}ENDITAL\"\n", + "\n", + " # tag calibrated parameters\n", + " if p_name in bcm.priors:\n", + " legible_name = params_df.loc[index, 'legible_name']\n", + " params_df.loc[index, 'legible_name'] = f\"{legible_name} SUPERC\"\n", "\n", " return params_df" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 448, "metadata": {}, "outputs": [], "source": [ @@ -109,29 +125,76 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 457, "metadata": {}, "outputs": [], "source": [ + "pd.set_option('display.max_colwidth', None)\n", "tex_table = df.to_latex(\n", - " columns=['legible_name', 'value', 'unit', 'evidence'],\n", - " header=['Parameter', \"Value\", \"Unit\", \"Evidence\"],\n", - " index=False\n", + " columns=['legible_name', 'value', 'evidence'],\n", + " header=['Parameter', \"Value/Distribution\", \"Evidence\"],\n", + " index=False,\n", + " label=\"param_table\",\n", + " caption=\"Model parameters\"\n", ")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 458, "metadata": {}, "outputs": [], "source": [ + "# Handle citations\n", "tex_table = tex_table.replace(\"\\\\textbackslash cite\\\\\", r\"\\cite\").replace(\"\\\\}\", \"}\")" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 459, + "metadata": {}, + "outputs": [], + "source": [ + "# Equation mode not captured\n", + "tex_table = tex_table.replace(\"(\\$m\\_S\\$)\", r\"($m_S$)\")\n", + "tex_table = tex_table.replace(\"(\\$m\\_C\\$)\", r\"($m_C$)\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 460, + "metadata": {}, + "outputs": [], + "source": [ + "# Use bold and italic font types for headings and sub-headings\n", + "tex_table = tex_table.replace(\"BEGINBOLD\", r\"\\textbf{\").replace(\"ENDBOLD\", r\"}\")\n", + "tex_table = tex_table.replace(\"BEGINITAL\", r\"\\quad \\textit{\").replace(\"ENDITAL\", r\"}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 461, + "metadata": {}, + "outputs": [], + "source": [ + "# include superscript C for calibrated parameters\n", + "tex_table = tex_table.replace(\"SUPERC\", r\"\\textsuperscript{C}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 462, + "metadata": {}, + "outputs": [], + "source": [ + "# Change the table font so its width matches the pagewidth \n", + "tex_table = tex_table.replace(\"\\\\begin{tabular}\", r\"\\resizebox{\\textwidth}{!}{\\begin{tabular}\")\n", + "tex_table = tex_table.replace(\"\\\\end{tabular}\", r\"\\end{tabular}}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 463, "metadata": {}, "outputs": [], "source": [ @@ -140,7 +203,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 464, "metadata": {}, "outputs": [], "source": [ @@ -148,6 +211,13 @@ " f.write(tex_table)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, diff --git a/notebooks/user/rragonnet/project_specific/School_Closure/params_info.xlsx b/notebooks/user/rragonnet/project_specific/School_Closure/params_info.xlsx index 820075831..0f9a1bbfd 100644 --- a/notebooks/user/rragonnet/project_specific/School_Closure/params_info.xlsx +++ b/notebooks/user/rragonnet/project_specific/School_Closure/params_info.xlsx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc16357b1f18cb3d89047a306eea3dd0724d2430a0f018a926a428eeea8a196f -size 9081 +oid sha256:9967ec726403c05fda3bb811dc5a9e4fa7bddda6cdb01ca30f4a7e8d2415a24d +size 10401