Skip to content

Commit

Permalink
Progress on parameter table
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-ragonnet committed Jul 18, 2023
1 parent 606cc7b commit 27dbaa9
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/tex/tex_descriptions/models/sm_covid/deaths.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}).
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,12 +20,12 @@
\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:
\begin{equation}
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}).
2 changes: 1 addition & 1 deletion docs/tex/tex_descriptions/models/sm_covid/mixing.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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''.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}

% ____________________________________________________
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}).

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 34 additions & 6 deletions docs/tex/tex_descriptions/projects/sm_covid/param_table.tex
Original file line number Diff line number Diff line change
@@ -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}
Binary file modified docs/tex/user/rragonnet/sm_covid.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 441,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -15,7 +15,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 442,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 443,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -33,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 444,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 445,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 446,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -78,29 +78,45 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 447,
"metadata": {},
"outputs": [],
"source": [
"def make_output_params_df(params_info, model_params):\n",
" 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": [
Expand All @@ -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": [
Expand All @@ -140,14 +203,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 464,
"metadata": {},
"outputs": [],
"source": [
"with out_path.open(\"w\") as f:\n",
" f.write(tex_table)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
Git LFS file not shown

0 comments on commit 27dbaa9

Please sign in to comment.