Skip to content

Commit 98fce21

Browse files
p-robotroberthinch
andauthoredJun 29, 2020
Parameter update (specificity, dropout, compliance, asymp frac, mild frac, gen time) (BDI-pathogens#119)
* Adjust parameters for testing specificity, dropout and compliance rates, fraction asymptomatic, mild fraction, and generation time distribution; adjust script for processing parameter dictionary so that whitespace is stripped from the parameter-type column before unique values are found * Lower min number of cases to test in test_recursive_testing Fix test_quarantine_household_on_symptoms to only look at index cases from the end time. This is required because when we filter out hospitalised people we only do it for the final time. Also remove days_since_index/contact calcs which are no longer used. * Fix hospital test test_interaction_type_representative Missing ICU interactions due to the insufficient overall cases at the end of the interaction. Increase the number of seed infections and reduce the end_time to ensure a large number of cases and the end of the test (hence ICU interactions). Co-authored-by: roberthinch <[email protected]>
1 parent ca85c54 commit 98fce21

9 files changed

+92
-273
lines changed
 

‎documentation/parameters/active_intervention_parameters.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
| `quarantine_length_traced_symptoms` | 14 | - | Maximum number of days quarantine for individuals who are traced after a contact reported symptoms | - |
66
| `quarantine_length_traced_positive` | 14 | - | Maximum number of days quarantine for individuals who are traced after a contact tested positive | - |
77
| `quarantine_length_positive` | 14 | - | Maximum number of days quarantine for individuals with a positive test result | - |
8-
| `quarantine_dropout_traced_symptoms` | 0.03 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms | - |
8+
| `quarantine_dropout_traced_symptoms` | 0.04 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms | - |
99
| `quarantine_dropout_traced_positive` | 0.03 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual who tested positive | - |
10-
| `quarantine_dropout_positive` | 0.02 | - | Daily probability of drop out for an individual quarantining after a positive test result | - |
11-
| `quarantine_compliance_traced_symptoms` | 0.8 | - | Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms | - |
10+
| `quarantine_dropout_positive` | 0.01 | - | Daily probability of drop out for an individual quarantining after a positive test result | - |
11+
| `quarantine_compliance_traced_symptoms` | 0.5 | - | Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms | - |
1212
| `quarantine_compliance_traced_positive` | 0.9 | - | Fraction of individuals who initially comply with a quarantine notification after their contact tested positive | - |
1313
| `test_on_symptoms` | 0 | - | Test individuals who show symptoms (0=no, 1=yes) | - |
1414
| `test_on_traced` | 0 | - | Test individuals who have been contact-traced (0=no, 1=yes) | - |
1515
| `test_release_on_negative` | 1 | - | Release individuals following a negative test (0=no, 1=yes) | - |
1616
| `trace_on_symptoms` | 0 | - | Trace contacts of individuals who show symptoms (0=no, 1=yes) | - |
1717
| `trace_on_positive` | 0 | - | Trace contacts of an individual who tests positive (0=no, 1=yes) | - |
18-
| `retrace_on_positive` | 0 | - | Repeat contract tracing be carried out on a positive test if already tested on symptoms (0=no, 1=yes) | - |
18+
| `retrace_on_positive` | 0 | - | Repeat contract tracing be carried out on a positive test if already traced on symptoms (0=no, 1=yes) | - |
1919
| `quarantine_on_traced` | 0 | - | Quarantine individuals who are traced (0=no, 1=yes) | - |
2020
| `traceable_interaction_fraction` | 0.8 | - | Fraction of interactions that are captured if both users have the app | - |
2121
| `tracing_network_depth` | 0 | - | Depth of interaction network to contact | - |
@@ -29,6 +29,9 @@
2929
| `quarantine_days` | 7 | - | The number of previous days' contacts to be traced and contacted | - |
3030
| `quarantine_smart_release_day` | 0 | - | Release a chain of quarantined people if after this number of days nobody has shown symptoms on the chain | - |
3131
| `test_insensitive_period` | 3 | - | Number of days following infection the test is insensitive | Woelfel et al. 2020 |
32+
| `test_sensitive_period` | 14 | - | Number of days following infection to end of period where test is sensitive | - |
33+
| `test_sensitivity` | 0.8 | - | Sensitivity of test in the time where it is sensitive | - |
34+
| `test_specificity` | 0.999 | - | Specificity of test (at any time) | - |
3235
| `test_order_wait` | 1 | - | Minimum number of days to wait to take a test | - |
3336
| `test_result_wait` | 1 | - | Number of days to wait for a test result | - |
3437
| `app_users_fraction_0_9` | 0.09 | - | Maximum fraction of the population with smartphones aged 0-9 | OFCOM 3-5 year olds |

‎documentation/parameters/disease_dynamics_parameters.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
| `sd_time_to_recover` | 5 | &#963;<sub>rec</sub> | Standard deviation of time to recovery if hospitalisaion is not required (days) | Yang et al 2020 |
1111
| `mean_time_to_death` | 11.74 | &#956;<sub>death</sub> | Mean time to death after acquiring critical care (days) | Personal communication with SPI-M; data soon to be published |
1212
| `sd_time_to_death` | 8.79 | &#963;<sub>death</sub> | Standard deviation of time to death after acquiring critical care (days) | Personal communication with SPI-M; data soon to be published |
13-
| `fraction_asymptomatic_0_9` | 0.16 | &#966;<sub>asym</sub>(0-9) | Fraction of infected individuals who are asymptomatic, aged 0-9 | Byambasuren et al. 2020 |
14-
| `fraction_asymptomatic_10_19` | 0.16 | &#966;<sub>asym</sub>(10-19) | Fraction of infected individuals who are asymptomatic, aged 10-19 | Byambasuren et al. 2020 |
15-
| `fraction_asymptomatic_20_29` | 0.16 | &#966;<sub>asym</sub>(20-29) | Fraction of infected individuals who are asymptomatic, aged 20-29 | Byambasuren et al. 2020 |
16-
| `fraction_asymptomatic_30_39` | 0.16 | &#966;<sub>asym</sub>(30-39) | Fraction of infected individuals who are asymptomatic, aged 30-39 | Byambasuren et al. 2020 |
17-
| `fraction_asymptomatic_40_49` | 0.16 | &#966;<sub>asym</sub>(40-49) | Fraction of infected individuals who are asymptomatic, aged 40-49 | Byambasuren et al. 2020 |
18-
| `fraction_asymptomatic_50_59` | 0.16 | &#966;<sub>asym</sub>(50-59) | Fraction of infected individuals who are asymptomatic, aged 50-59 | Byambasuren et al. 2020 |
19-
| `fraction_asymptomatic_60_69` | 0.16 | &#966;<sub>asym</sub>(60-69) | Fraction of infected individuals who are asymptomatic, aged 60-69 | Byambasuren et al. 2020 |
20-
| `fraction_asymptomatic_70_79` | 0.16 | &#966;<sub>asym</sub>(70-79) | Fraction of infected individuals who are asymptomatic, aged 70-79 | Byambasuren et al. 2020 |
21-
| `fraction_asymptomatic_80` | 0.16 | &#966;<sub>asym</sub>(80) | Fraction of infected individuals who are asymptomatic, aged 80+ | Byambasuren et al. 2020 |
22-
| `mild_fraction_0_9` | 0.79 | &#966;<sub>mild</sub>(0-9) | Fraction of infected individuals with mild symptoms, aged 0-9 | de Souza et al. 2020 |
23-
| `mild_fraction_10_19` | 0.79 | &#966;<sub>mild</sub>(10-19) | Fraction of infected individuals with mild symptoms, aged 10-19 | de Souza et al. 2020 |
24-
| `mild_fraction_20_29` | 0.73 | &#966;<sub>mild</sub>(20-29) | Fraction of infected individuals with mild symptoms, aged 20-29 | Yang, Lu et al. 2020 |
25-
| `mild_fraction_30_39` | 0.68 | &#966;<sub>mild</sub>(30-39) | Fraction of infected individuals with mild symptoms, aged 30-39 | Yang, Lu et al. 2020 |
26-
| `mild_fraction_40_49` | 0.65 | &#966;<sub>mild</sub>(40-49) | Fraction of infected individuals with mild symptoms, aged 40-49 | Yang, Lu et al. 2020 |
27-
| `mild_fraction_50_59` | 0.59 | &#966;<sub>mild</sub>(50-59) | Fraction of infected individuals with mild symptoms, aged 50-59 | Yang, Lu et al. 2020 |
28-
| `mild_fraction_60_69` | 0.53 | &#966;<sub>mild</sub>(60-69) | Fraction of infected individuals with mild symptoms, aged 60-69 | Yang, Lu et al. 2020 |
29-
| `mild_fraction_70_79` | 0.41 | &#966;<sub>mild</sub>(70-79) | Fraction of infected individuals with mild symptoms, aged 70-79 | Yang, Lu et al. 2020 |
30-
| `mild_fraction_80` | 0.27 | &#966;<sub>mild</sub>(80) | Fraction of infected individuals with mild symptoms, aged 80+ | Yang, Lu et al. 2020 |
13+
| `fraction_asymptomatic_0_9` | 0.339 | &#966;<sub>asym</sub>(0-9) | Fraction of infected individuals who are asymptomatic, aged 0-9 | - |
14+
| `fraction_asymptomatic_10_19` | 0.305 | &#966;<sub>asym</sub>(10-19) | Fraction of infected individuals who are asymptomatic, aged 10-19 | - |
15+
| `fraction_asymptomatic_20_29` | 0.271 | &#966;<sub>asym</sub>(20-29) | Fraction of infected individuals who are asymptomatic, aged 20-29 | - |
16+
| `fraction_asymptomatic_30_39` | 0.237 | &#966;<sub>asym</sub>(30-39) | Fraction of infected individuals who are asymptomatic, aged 30-39 | - |
17+
| `fraction_asymptomatic_40_49` | 0.203 | &#966;<sub>asym</sub>(40-49) | Fraction of infected individuals who are asymptomatic, aged 40-49 | - |
18+
| `fraction_asymptomatic_50_59` | 0.169 | &#966;<sub>asym</sub>(50-59) | Fraction of infected individuals who are asymptomatic, aged 50-59 | - |
19+
| `fraction_asymptomatic_60_69` | 0.135 | &#966;<sub>asym</sub>(60-69) | Fraction of infected individuals who are asymptomatic, aged 60-69 | - |
20+
| `fraction_asymptomatic_70_79` | 0.101 | &#966;<sub>asym</sub>(70-79) | Fraction of infected individuals who are asymptomatic, aged 70-79 | - |
21+
| `fraction_asymptomatic_80` | 0.0667 | &#966;<sub>asym</sub>(80) | Fraction of infected individuals who are asymptomatic, aged 80+ | - |
22+
| `mild_fraction_0_9` | 0.224 | &#966;<sub>mild</sub>(0-9) | Fraction of infected individuals with mild symptoms, aged 0-9 | Riccardo et al. 2020 |
23+
| `mild_fraction_10_19` | 0.212 | &#966;<sub>mild</sub>(10-19) | Fraction of infected individuals with mild symptoms, aged 10-19 | Riccardo et al. 2020 |
24+
| `mild_fraction_20_29` | 0.198 | &#966;<sub>mild</sub>(20-29) | Fraction of infected individuals with mild symptoms, aged 20-29 | Riccardo et al. 2020 |
25+
| `mild_fraction_30_39` | 0.181 | &#966;<sub>mild</sub>(30-39) | Fraction of infected individuals with mild symptoms, aged 30-39 | Riccardo et al. 2020 |
26+
| `mild_fraction_40_49` | 0.162 | &#966;<sub>mild</sub>(40-49) | Fraction of infected individuals with mild symptoms, aged 40-49 | Riccardo et al. 2020 |
27+
| `mild_fraction_50_59` | 0.140 | &#966;<sub>mild</sub>(50-59) | Fraction of infected individuals with mild symptoms, aged 50-59 | Riccardo et al. 2020 |
28+
| `mild_fraction_60_69` | 0.117 | &#966;<sub>mild</sub>(60-69) | Fraction of infected individuals with mild symptoms, aged 60-69 | Riccardo et al. 2020 |
29+
| `mild_fraction_70_79` | 0.0906 | &#966;<sub>mild</sub>(70-79) | Fraction of infected individuals with mild symptoms, aged 70-79 | Riccardo et al. 2020 |
30+
| `mild_fraction_80` | 0.0623 | &#966;<sub>mild</sub>(80) | Fraction of infected individuals with mild symptoms, aged 80+ | Riccardo et al. 2020 |
3131
| `mean_asymptomatic_to_recovery` | 15 | &#956;<sub>a,rec</sub> | Mean time from infection to recovery (and no longer infectious) for an asymptomatic individual (days) | Yang et al 2020 |
3232
| `sd_asymptomatic_to_recovery` | 5 | &#963;<sub>a,rec</sub> | Standard deviation from infection to recovery for an asymptomatic individual (days) | Yang et al 2020 |
3333
| `hospitalised_fraction_0_9` | 0.01 | &#966;<sub>hosp</sub>(0-9) | Fraction of infected individuals with severe symptoms aged 0-9 who are hospitalised | Ferguson et al, 2020 |

‎documentation/parameters/infection_parameters.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
| Name | Value | Symbol | Description | Source |
33
| ---- | ---- | ---- | ---- | ---- |
44
| `n_seed_infection` | 5 | - | Number of infections seeded at simulation start | - |
5-
| `mean_infectious_period` | 6 | &#956; | Mean of the generation time distribution (days) | Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022 |
6-
| `sd_infectious_period` | 2.5 | &#963; | Standard deviation (days) of infectious period | Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022 |
5+
| `mean_infectious_period` | 5.5 | &#956; | Mean of the generation time distribution (days) | Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020 |
6+
| `sd_infectious_period` | 2.14 | &#963; | Standard deviation (days) of infectious period | Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020 |
77
| `infectious_rate` | 5.64 | *R* | Mean number of individuals infected by each infectious individual with moderate to severe symptoms | Derived from calibration |
88
| `asymptomatic_infectious_factor` | 0.29 | *A<sub>asym</sub>* | Infectious rate of asymptomatic individuals relative to symptomatic individuals | Luo et al 2020 |
99
| `mild_infectious_factor` | 0.48 | *A<sub>mild</sub>* | Infectious rate of mildly symptomatic individuals relative to symptomatic individuals | Luo et al 2020 |

‎documentation/parameters/parameter_dictionary.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
| `days_of_interactions` | 10 | - | Length of historic interactions traced (days) | - |
2222
| `end_time` | 200 | - | End time (total number of simulated days) | - |
2323
| `n_seed_infection` | 5 | - | Number of infections seeded at simulation start | - |
24-
| `mean_infectious_period` | 6 | &#956; | Mean of the generation time distribution (days) | Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022 |
25-
| `sd_infectious_period` | 2.5 | &#963; | Standard deviation (days) of infectious period | Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022 |
24+
| `mean_infectious_period` | 5.5 | &#956; | Mean of the generation time distribution (days) | Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020 |
25+
| `sd_infectious_period` | 2.14 | &#963; | Standard deviation (days) of infectious period | Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020 |
2626
| `infectious_rate` | 5.64 | *R* | Mean number of individuals infected by each infectious individual with moderate to severe symptoms | Derived from calibration |
2727
| `mean_time_to_symptoms` | 5.42 | &#956;<sub>sym</sub> | Mean time from infection to onset of symptoms (days) | McAloon et al. |
2828
| `sd_time_to_symptoms` | 2.7 | &#963;<sub>sym</sub> | Standard deviation of time from infection to onset of symptoms (days) | McAloon et al. |
@@ -33,25 +33,25 @@
3333
| `sd_time_to_recover` | 5 | &#963;<sub>rec</sub> | Standard deviation of time to recovery if hospitalisaion is not required (days) | Yang et al 2020 |
3434
| `mean_time_to_death` | 11.74 | &#956;<sub>death</sub> | Mean time to death after acquiring critical care (days) | Personal communication with SPI-M; data soon to be published |
3535
| `sd_time_to_death` | 8.79 | &#963;<sub>death</sub> | Standard deviation of time to death after acquiring critical care (days) | Personal communication with SPI-M; data soon to be published |
36-
| `fraction_asymptomatic_0_9` | 0.16 | &#966;<sub>asym</sub>(0-9) | Fraction of infected individuals who are asymptomatic, aged 0-9 | Byambasuren et al. 2020 |
37-
| `fraction_asymptomatic_10_19` | 0.16 | &#966;<sub>asym</sub>(10-19) | Fraction of infected individuals who are asymptomatic, aged 10-19 | Byambasuren et al. 2020 |
38-
| `fraction_asymptomatic_20_29` | 0.16 | &#966;<sub>asym</sub>(20-29) | Fraction of infected individuals who are asymptomatic, aged 20-29 | Byambasuren et al. 2020 |
39-
| `fraction_asymptomatic_30_39` | 0.16 | &#966;<sub>asym</sub>(30-39) | Fraction of infected individuals who are asymptomatic, aged 30-39 | Byambasuren et al. 2020 |
40-
| `fraction_asymptomatic_40_49` | 0.16 | &#966;<sub>asym</sub>(40-49) | Fraction of infected individuals who are asymptomatic, aged 40-49 | Byambasuren et al. 2020 |
41-
| `fraction_asymptomatic_50_59` | 0.16 | &#966;<sub>asym</sub>(50-59) | Fraction of infected individuals who are asymptomatic, aged 50-59 | Byambasuren et al. 2020 |
42-
| `fraction_asymptomatic_60_69` | 0.16 | &#966;<sub>asym</sub>(60-69) | Fraction of infected individuals who are asymptomatic, aged 60-69 | Byambasuren et al. 2020 |
43-
| `fraction_asymptomatic_70_79` | 0.16 | &#966;<sub>asym</sub>(70-79) | Fraction of infected individuals who are asymptomatic, aged 70-79 | Byambasuren et al. 2020 |
44-
| `fraction_asymptomatic_80` | 0.16 | &#966;<sub>asym</sub>(80) | Fraction of infected individuals who are asymptomatic, aged 80+ | Byambasuren et al. 2020 |
36+
| `fraction_asymptomatic_0_9` | 0.339 | &#966;<sub>asym</sub>(0-9) | Fraction of infected individuals who are asymptomatic, aged 0-9 | - |
37+
| `fraction_asymptomatic_10_19` | 0.305 | &#966;<sub>asym</sub>(10-19) | Fraction of infected individuals who are asymptomatic, aged 10-19 | - |
38+
| `fraction_asymptomatic_20_29` | 0.271 | &#966;<sub>asym</sub>(20-29) | Fraction of infected individuals who are asymptomatic, aged 20-29 | - |
39+
| `fraction_asymptomatic_30_39` | 0.237 | &#966;<sub>asym</sub>(30-39) | Fraction of infected individuals who are asymptomatic, aged 30-39 | - |
40+
| `fraction_asymptomatic_40_49` | 0.203 | &#966;<sub>asym</sub>(40-49) | Fraction of infected individuals who are asymptomatic, aged 40-49 | - |
41+
| `fraction_asymptomatic_50_59` | 0.169 | &#966;<sub>asym</sub>(50-59) | Fraction of infected individuals who are asymptomatic, aged 50-59 | - |
42+
| `fraction_asymptomatic_60_69` | 0.135 | &#966;<sub>asym</sub>(60-69) | Fraction of infected individuals who are asymptomatic, aged 60-69 | - |
43+
| `fraction_asymptomatic_70_79` | 0.101 | &#966;<sub>asym</sub>(70-79) | Fraction of infected individuals who are asymptomatic, aged 70-79 | - |
44+
| `fraction_asymptomatic_80` | 0.0667 | &#966;<sub>asym</sub>(80) | Fraction of infected individuals who are asymptomatic, aged 80+ | - |
4545
| `asymptomatic_infectious_factor` | 0.29 | *A<sub>asym</sub>* | Infectious rate of asymptomatic individuals relative to symptomatic individuals | Luo et al 2020 |
46-
| `mild_fraction_0_9` | 0.79 | &#966;<sub>mild</sub>(0-9) | Fraction of infected individuals with mild symptoms, aged 0-9 | de Souza et al. 2020 |
47-
| `mild_fraction_10_19` | 0.79 | &#966;<sub>mild</sub>(10-19) | Fraction of infected individuals with mild symptoms, aged 10-19 | de Souza et al. 2020 |
48-
| `mild_fraction_20_29` | 0.73 | &#966;<sub>mild</sub>(20-29) | Fraction of infected individuals with mild symptoms, aged 20-29 | Yang, Lu et al. 2020 |
49-
| `mild_fraction_30_39` | 0.68 | &#966;<sub>mild</sub>(30-39) | Fraction of infected individuals with mild symptoms, aged 30-39 | Yang, Lu et al. 2020 |
50-
| `mild_fraction_40_49` | 0.65 | &#966;<sub>mild</sub>(40-49) | Fraction of infected individuals with mild symptoms, aged 40-49 | Yang, Lu et al. 2020 |
51-
| `mild_fraction_50_59` | 0.59 | &#966;<sub>mild</sub>(50-59) | Fraction of infected individuals with mild symptoms, aged 50-59 | Yang, Lu et al. 2020 |
52-
| `mild_fraction_60_69` | 0.53 | &#966;<sub>mild</sub>(60-69) | Fraction of infected individuals with mild symptoms, aged 60-69 | Yang, Lu et al. 2020 |
53-
| `mild_fraction_70_79` | 0.41 | &#966;<sub>mild</sub>(70-79) | Fraction of infected individuals with mild symptoms, aged 70-79 | Yang, Lu et al. 2020 |
54-
| `mild_fraction_80` | 0.27 | &#966;<sub>mild</sub>(80) | Fraction of infected individuals with mild symptoms, aged 80+ | Yang, Lu et al. 2020 |
46+
| `mild_fraction_0_9` | 0.224 | &#966;<sub>mild</sub>(0-9) | Fraction of infected individuals with mild symptoms, aged 0-9 | Riccardo et al. 2020 |
47+
| `mild_fraction_10_19` | 0.212 | &#966;<sub>mild</sub>(10-19) | Fraction of infected individuals with mild symptoms, aged 10-19 | Riccardo et al. 2020 |
48+
| `mild_fraction_20_29` | 0.198 | &#966;<sub>mild</sub>(20-29) | Fraction of infected individuals with mild symptoms, aged 20-29 | Riccardo et al. 2020 |
49+
| `mild_fraction_30_39` | 0.181 | &#966;<sub>mild</sub>(30-39) | Fraction of infected individuals with mild symptoms, aged 30-39 | Riccardo et al. 2020 |
50+
| `mild_fraction_40_49` | 0.162 | &#966;<sub>mild</sub>(40-49) | Fraction of infected individuals with mild symptoms, aged 40-49 | Riccardo et al. 2020 |
51+
| `mild_fraction_50_59` | 0.140 | &#966;<sub>mild</sub>(50-59) | Fraction of infected individuals with mild symptoms, aged 50-59 | Riccardo et al. 2020 |
52+
| `mild_fraction_60_69` | 0.117 | &#966;<sub>mild</sub>(60-69) | Fraction of infected individuals with mild symptoms, aged 60-69 | Riccardo et al. 2020 |
53+
| `mild_fraction_70_79` | 0.0906 | &#966;<sub>mild</sub>(70-79) | Fraction of infected individuals with mild symptoms, aged 70-79 | Riccardo et al. 2020 |
54+
| `mild_fraction_80` | 0.0623 | &#966;<sub>mild</sub>(80) | Fraction of infected individuals with mild symptoms, aged 80+ | Riccardo et al. 2020 |
5555
| `mild_infectious_factor` | 0.48 | *A<sub>mild</sub>* | Infectious rate of mildly symptomatic individuals relative to symptomatic individuals | Luo et al 2020 |
5656
| `mean_asymptomatic_to_recovery` | 15 | &#956;<sub>a,rec</sub> | Mean time from infection to recovery (and no longer infectious) for an asymptomatic individual (days) | Yang et al 2020 |
5757
| `sd_asymptomatic_to_recovery` | 5 | &#963;<sub>a,rec</sub> | Standard deviation from infection to recovery for an asymptomatic individual (days) | Yang et al 2020 |
@@ -128,17 +128,17 @@
128128
| `quarantine_length_traced_positive` | 14 | - | Maximum number of days quarantine for individuals who are traced after a contact tested positive | - |
129129
| `quarantine_length_positive` | 14 | - | Maximum number of days quarantine for individuals with a positive test result | - |
130130
| `quarantine_dropout_self` | 0.02 | - | Daily probability of drop out for an individual quarantining after self-reporting symptoms | - |
131-
| `quarantine_dropout_traced_symptoms` | 0.03 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms | - |
131+
| `quarantine_dropout_traced_symptoms` | 0.04 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms | - |
132132
| `quarantine_dropout_traced_positive` | 0.03 | - | Daily probability of drop out for an individual quarantining after being traced following contact with an individual who tested positive | - |
133-
| `quarantine_dropout_positive` | 0.02 | - | Daily probability of drop out for an individual quarantining after a positive test result | - |
134-
| `quarantine_compliance_traced_symptoms` | 0.8 | - | Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms | - |
133+
| `quarantine_dropout_positive` | 0.01 | - | Daily probability of drop out for an individual quarantining after a positive test result | - |
134+
| `quarantine_compliance_traced_symptoms` | 0.5 | - | Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms | - |
135135
| `quarantine_compliance_traced_positive` | 0.9 | - | Fraction of individuals who initially comply with a quarantine notification after their contact tested positive | - |
136136
| `test_on_symptoms` | 0 | - | Test individuals who show symptoms (0=no, 1=yes) | - |
137137
| `test_on_traced` | 0 | - | Test individuals who have been contact-traced (0=no, 1=yes) | - |
138138
| `test_release_on_negative` | 1 | - | Release individuals following a negative test (0=no, 1=yes) | - |
139139
| `trace_on_symptoms` | 0 | - | Trace contacts of individuals who show symptoms (0=no, 1=yes) | - |
140140
| `trace_on_positive` | 0 | - | Trace contacts of an individual who tests positive (0=no, 1=yes) | - |
141-
| `retrace_on_positive` | 0 | - | Repeat contract tracing be carried out on a positive test if already tested on symptoms (0=no, 1=yes) | - |
141+
| `retrace_on_positive` | 0 | - | Repeat contract tracing be carried out on a positive test if already traced on symptoms (0=no, 1=yes) | - |
142142
| `quarantine_on_traced` | 0 | - | Quarantine individuals who are traced (0=no, 1=yes) | - |
143143
| `traceable_interaction_fraction` | 0.8 | - | Fraction of interactions that are captured if both users have the app | - |
144144
| `tracing_network_depth` | 0 | - | Depth of interaction network to contact | - |
@@ -156,7 +156,7 @@
156156
| `test_insensitive_period` | 3 | - | Number of days following infection the test is insensitive | Woelfel et al. 2020 |
157157
| `test_sensitive_period` | 14 | - | Number of days following infection to end of period where test is sensitive | - |
158158
| `test_sensitivity` | 0.8 | - | Sensitivity of test in the time where it is sensitive | - |
159-
| `test_specificity` | 0.99 | - | Specificity of test (at any time) | - |
159+
| `test_specificity` | 0.999 | - | Specificity of test (at any time) | - |
160160
| `test_order_wait` | 1 | - | Minimum number of days to wait to take a test | - |
161161
| `test_order_wait_priority` | -1 | - | Minimum number of days to wait for a priority test to be taken | - |
162162
| `test_result_wait` | 1 | - | Number of days to wait for a test result | - |

‎python/transpose_parameters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def create_markdown_from_df(df, title = ""):
8484
# Write parameters in a form readable by the model
8585
df[["Name", "Value"]].set_index("Name").transpose().to_csv(wide_parameter_file, index = False)
8686

87-
# Generate markdown tables for each parameter type
88-
parameter_types = df["Parameter type"].dropna().unique()
87+
# Generate markdown tables for each parameter type (first strip on white space)
88+
parameter_types = df["Parameter type"].dropna().str.strip().unique()
8989

9090
for t in parameter_types:
9191
df_type = df.loc[df["Parameter type"] == t]

‎tests/data/baseline_parameters.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
rng_seed,param_id,n_total,mean_work_interactions_child,mean_work_interactions_adult,mean_work_interactions_elderly,daily_fraction_work,work_network_rewire,mean_random_interactions_child,sd_random_interactions_child,mean_random_interactions_adult,sd_random_interactions_adult,mean_random_interactions_elderly,sd_random_interactions_elderly,random_interaction_distribution,child_network_adults,elderly_network_adults,days_of_interactions,end_time,n_seed_infection,mean_infectious_period,sd_infectious_period,infectious_rate,mean_time_to_symptoms,sd_time_to_symptoms,mean_time_to_hospital,mean_time_to_critical,sd_time_to_critical,mean_time_to_recover,sd_time_to_recover,mean_time_to_death,sd_time_to_death,fraction_asymptomatic_0_9,fraction_asymptomatic_10_19,fraction_asymptomatic_20_29,fraction_asymptomatic_30_39,fraction_asymptomatic_40_49,fraction_asymptomatic_50_59,fraction_asymptomatic_60_69,fraction_asymptomatic_70_79,fraction_asymptomatic_80,asymptomatic_infectious_factor,mild_fraction_0_9,mild_fraction_10_19,mild_fraction_20_29,mild_fraction_30_39,mild_fraction_40_49,mild_fraction_50_59,mild_fraction_60_69,mild_fraction_70_79,mild_fraction_80,mild_infectious_factor,mean_asymptomatic_to_recovery,sd_asymptomatic_to_recovery,household_size_1,household_size_2,household_size_3,household_size_4,household_size_5,household_size_6,population_0_9,population_10_19,population_20_29,population_30_39,population_40_49,population_50_59,population_60_69,population_70_79,population_80,daily_non_cov_symptoms_rate,relative_susceptibility_0_9,relative_susceptibility_10_19,relative_susceptibility_20_29,relative_susceptibility_30_39,relative_susceptibility_40_49,relative_susceptibility_50_59,relative_susceptibility_60_69,relative_susceptibility_70_79,relative_susceptibility_80,relative_transmission_household,relative_transmission_occupation,relative_transmission_random,hospitalised_fraction_0_9,hospitalised_fraction_10_19,hospitalised_fraction_20_29,hospitalised_fraction_30_39,hospitalised_fraction_40_49,hospitalised_fraction_50_59,hospitalised_fraction_60_69,hospitalised_fraction_70_79,hospitalised_fraction_80,critical_fraction_0_9,critical_fraction_10_19,critical_fraction_20_29,critical_fraction_30_39,critical_fraction_40_49,critical_fraction_50_59,critical_fraction_60_69,critical_fraction_70_79,critical_fraction_80,fatality_fraction_0_9,fatality_fraction_10_19,fatality_fraction_20_29,fatality_fraction_30_39,fatality_fraction_40_49,fatality_fraction_50_59,fatality_fraction_60_69,fatality_fraction_70_79,fatality_fraction_80,mean_time_hospitalised_recovery,sd_time_hospitalised_recovery,mean_time_critical_survive,sd_time_critical_survive,location_death_icu_0_9,location_death_icu_10_19,location_death_icu_20_29,location_death_icu_30_39,location_death_icu_40_49,location_death_icu_50_59,location_death_icu_60_69,location_death_icu_70_79,location_death_icu_80,quarantine_length_self,quarantine_length_traced_symptoms,quarantine_length_traced_positive,quarantine_length_positive,quarantine_dropout_self,quarantine_dropout_traced_symptoms,quarantine_dropout_traced_positive,quarantine_dropout_positive,quarantine_compliance_traced_symptoms,quarantine_compliance_traced_positive,test_on_symptoms,test_on_traced,test_release_on_negative,trace_on_symptoms,trace_on_positive,retrace_on_positive,quarantine_on_traced,traceable_interaction_fraction,tracing_network_depth,allow_clinical_diagnosis,quarantine_household_on_positive,quarantine_household_on_symptoms,quarantine_household_on_traced_positive,quarantine_household_on_traced_symptoms,quarantine_household_contacts_on_positive,quarantine_household_contacts_on_symptoms,quarantined_daily_interactions,quarantine_days,quarantine_smart_release_day,hospitalised_daily_interactions,test_insensitive_period,test_sensitive_period,test_sensitivity,test_specificity,test_order_wait,test_order_wait_priority,test_result_wait,test_result_wait_priority,priority_test_contacts_0_9,priority_test_contacts_10_19,priority_test_contacts_20_29,priority_test_contacts_30_39,priority_test_contacts_40_49,priority_test_contacts_50_59,priority_test_contacts_60_69,priority_test_contacts_70_79,priority_test_contacts_80,self_quarantine_fraction,app_users_fraction_0_9,app_users_fraction_10_19,app_users_fraction_20_29,app_users_fraction_30_39,app_users_fraction_40_49,app_users_fraction_50_59,app_users_fraction_60_69,app_users_fraction_70_79,app_users_fraction_80,app_turn_on_time,lockdown_occupation_multiplier_primary_network,lockdown_occupation_multiplier_secondary_network,lockdown_occupation_multiplier_working_network,lockdown_occupation_multiplier_retired_network,lockdown_occupation_multiplier_elderly_network,lockdown_random_network_multiplier,lockdown_house_interaction_multiplier,lockdown_time_on,lockdown_time_off,lockdown_elderly_time_on,lockdown_elderly_time_off,testing_symptoms_time_on,testing_symptoms_time_off,intervention_start_time,hospital_on,manual_trace_on,manual_trace_time_on,manual_trace_on_hospitalization,manual_trace_on_positive,manual_trace_delay,manual_trace_exclude_app_users,manual_trace_n_workers,manual_trace_interviews_per_worker_day,manual_trace_notifications_per_worker_day,manual_traceable_fraction_household,manual_traceable_fraction_occupation,manual_traceable_fraction_random
2-
1,1,1000000,10,7,3,0.5,0.1,2,2,4,4,3,3,1,0.2,0.2,10,200,5,6,2.5,5.64,5.42,2.7,5.14,2.27,2.27,12,5,11.74,8.79,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.16,0.29,0.79,0.79,0.73,0.68,0.65,0.59,0.53,0.41,0.27,0.48,15,5,7452,9936,4416,4140,1104,552,8054000,7528000,8712000,8835000,8500000,8968000,7069000,5488000,3281000,0.002,0.35,0.69,1.03,1.03,1.03,1.03,1.27,1.52,1.52,2,1,1,0.01,0.03,0.04,0.06,0.08,0.12,0.15,0.16,0.14,0.05,0.05,0.05,0.05,0.063,0.122,0.274,0.432,0.709,0.33,0.25,0.5,0.5,0.5,0.69,0.65,0.88,1,8.75,8.75,18.8,12.21,1,1,0.9,0.9,0.8,0.8,0.4,0.4,0.05,7,14,14,14,0.02,0.03,0.03,0.02,0.8,0.9,0,0,1,0,0,0,0,0.8,0,1,0,0,0,0,0,0,0,7,0,0,3,14,0.8,0.99,1,-1,1,-1,1000,1000,1000,1000,1000,1000,1000,1000,1000,0,0.09,0.8,0.97,0.96,0.94,0.86,0.7,0.48,0.32,10000,0.22,0.22,0.22,0.22,0.22,0.22,1.5,10000,10000,10000,10000,10000,10000,0,0,0,10000,1,0,1,0,300,6,12,1,0.8,0.05
2+
1,1,1000000,10,7,3,0.5,0.1,2,2,4,4,3,3,1,0.2,0.2,10,200,5,5.5,2.14,5.64,5.42,2.7,5.14,2.27,2.27,12,5,11.74,8.79,0.339,0.305,0.271,0.237,0.203,0.169,0.135,0.101,0.0667,0.29,0.224,0.212,0.198,0.181,0.162,0.140,0.117,0.0906,0.0623,0.48,15,5,7452,9936,4416,4140,1104,552,8054000,7528000,8712000,8835000,8500000,8968000,7069000,5488000,3281000,0.002,0.35,0.69,1.03,1.03,1.03,1.03,1.27,1.52,1.52,2,1,1,0.01,0.03,0.04,0.06,0.08,0.12,0.15,0.16,0.14,0.05,0.05,0.05,0.05,0.063,0.122,0.274,0.432,0.709,0.33,0.25,0.5,0.5,0.5,0.69,0.65,0.88,1,8.75,8.75,18.8,12.21,1,1,0.9,0.9,0.8,0.8,0.4,0.4,0.05,7,14,14,14,0.02,0.04,0.03,0.01,0.5,0.9,0,0,1,0,0,0,0,0.8,0,1,0,0,0,0,0,0,0,7,0,0,3,14,0.8,0.999,1,-1,1,-1,1000,1000,1000,1000,1000,1000,1000,1000,1000,0,0.09,0.8,0.97,0.96,0.94,0.86,0.7,0.48,0.32,10000,0.22,0.22,0.22,0.22,0.22,0.22,1.5,10000,10000,10000,10000,10000,10000,0,0,0,10000,1,0,1,0,300,6,12,1,0.8,0.05

‎tests/data/baseline_parameters_transpose.csv

+27-27
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ elderly_network_adults,0.2,,Ratio of adults to elderly in work network for elder
1919
days_of_interactions,10,,Length of historic interactions traced (days),,Active intervention parameters
2020
end_time,200,,End time (total number of simulated days),,
2121
n_seed_infection,5,,Number of infections seeded at simulation start,,Infection parameters
22-
mean_infectious_period,6,&#956;,Mean of the generation time distribution (days),"Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022",Infection parameters
23-
sd_infectious_period,2.5,&#963;,Standard deviation (days) of infectious period,"Ma et al, 2020; Ganyani et al. 2020; Ferretti & Wymant et al. 2022",Infection parameters
22+
mean_infectious_period,5.5,&#956;,Mean of the generation time distribution (days),"Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020",Infection parameters
23+
sd_infectious_period,2.14,&#963;,Standard deviation (days) of infectious period,"Ferretti et al in prep 2020; Ferretti & Wymant et al 2020; Xia et al 2020; He et al 2020; Cheng et al 2020",Infection parameters
2424
infectious_rate,5.64,*R*,Mean number of individuals infected by each infectious individual with moderate to severe symptoms,Derived from calibration,Infection parameters
2525
mean_time_to_symptoms,5.42,&#956;<sub>sym</sub>,Mean time from infection to onset of symptoms (days),McAloon et al.,Disease dynamics parameters
2626
sd_time_to_symptoms,2.7,&#963;<sub>sym</sub>,Standard deviation of time from infection to onset of symptoms (days),McAloon et al.,Disease dynamics parameters
@@ -31,25 +31,25 @@ mean_time_to_recover,12,&#956;<sub>rec</sub>,Mean time to recovery if hospitalis
3131
sd_time_to_recover,5,&#963;<sub>rec</sub>,Standard deviation of time to recovery if hospitalisaion is not required (days),Yang et al 2020,Disease dynamics parameters
3232
mean_time_to_death,11.74,&#956;<sub>death</sub>,Mean time to death after acquiring critical care (days),Personal communication with SPI-M; data soon to be published,Disease dynamics parameters
3333
sd_time_to_death,8.79,&#963;<sub>death</sub>,Standard deviation of time to death after acquiring critical care (days),Personal communication with SPI-M; data soon to be published,Disease dynamics parameters
34-
fraction_asymptomatic_0_9,0.16,&#966;<sub>asym</sub>(0-9),"Fraction of infected individuals who are asymptomatic, aged 0-9",Byambasuren et al. 2020,Disease dynamics parameters
35-
fraction_asymptomatic_10_19,0.16,&#966;<sub>asym</sub>(10-19),"Fraction of infected individuals who are asymptomatic, aged 10-19",Byambasuren et al. 2020,Disease dynamics parameters
36-
fraction_asymptomatic_20_29,0.16,&#966;<sub>asym</sub>(20-29),"Fraction of infected individuals who are asymptomatic, aged 20-29",Byambasuren et al. 2020,Disease dynamics parameters
37-
fraction_asymptomatic_30_39,0.16,&#966;<sub>asym</sub>(30-39),"Fraction of infected individuals who are asymptomatic, aged 30-39",Byambasuren et al. 2020,Disease dynamics parameters
38-
fraction_asymptomatic_40_49,0.16,&#966;<sub>asym</sub>(40-49),"Fraction of infected individuals who are asymptomatic, aged 40-49",Byambasuren et al. 2020,Disease dynamics parameters
39-
fraction_asymptomatic_50_59,0.16,&#966;<sub>asym</sub>(50-59),"Fraction of infected individuals who are asymptomatic, aged 50-59",Byambasuren et al. 2020,Disease dynamics parameters
40-
fraction_asymptomatic_60_69,0.16,&#966;<sub>asym</sub>(60-69),"Fraction of infected individuals who are asymptomatic, aged 60-69",Byambasuren et al. 2020,Disease dynamics parameters
41-
fraction_asymptomatic_70_79,0.16,&#966;<sub>asym</sub>(70-79),"Fraction of infected individuals who are asymptomatic, aged 70-79",Byambasuren et al. 2020,Disease dynamics parameters
42-
fraction_asymptomatic_80,0.16,&#966;<sub>asym</sub>(80),"Fraction of infected individuals who are asymptomatic, aged 80+",Byambasuren et al. 2020,Disease dynamics parameters
34+
fraction_asymptomatic_0_9,0.339,&#966;<sub>asym</sub>(0-9),"Fraction of infected individuals who are asymptomatic, aged 0-9",,Disease dynamics parameters
35+
fraction_asymptomatic_10_19,0.305,&#966;<sub>asym</sub>(10-19),"Fraction of infected individuals who are asymptomatic, aged 10-19",,Disease dynamics parameters
36+
fraction_asymptomatic_20_29,0.271,&#966;<sub>asym</sub>(20-29),"Fraction of infected individuals who are asymptomatic, aged 20-29",,Disease dynamics parameters
37+
fraction_asymptomatic_30_39,0.237,&#966;<sub>asym</sub>(30-39),"Fraction of infected individuals who are asymptomatic, aged 30-39",,Disease dynamics parameters
38+
fraction_asymptomatic_40_49,0.203,&#966;<sub>asym</sub>(40-49),"Fraction of infected individuals who are asymptomatic, aged 40-49",,Disease dynamics parameters
39+
fraction_asymptomatic_50_59,0.169,&#966;<sub>asym</sub>(50-59),"Fraction of infected individuals who are asymptomatic, aged 50-59",,Disease dynamics parameters
40+
fraction_asymptomatic_60_69,0.135,&#966;<sub>asym</sub>(60-69),"Fraction of infected individuals who are asymptomatic, aged 60-69",,Disease dynamics parameters
41+
fraction_asymptomatic_70_79,0.101,&#966;<sub>asym</sub>(70-79),"Fraction of infected individuals who are asymptomatic, aged 70-79",,Disease dynamics parameters
42+
fraction_asymptomatic_80,0.0667,&#966;<sub>asym</sub>(80),"Fraction of infected individuals who are asymptomatic, aged 80+",,Disease dynamics parameters
4343
asymptomatic_infectious_factor,0.29,*A<sub>asym</sub>*,Infectious rate of asymptomatic individuals relative to symptomatic individuals,Luo et al 2020,Infection parameters
44-
mild_fraction_0_9,0.79,&#966;<sub>mild</sub>(0-9),"Fraction of infected individuals with mild symptoms, aged 0-9",de Souza et al. 2020,Disease dynamics parameters
45-
mild_fraction_10_19,0.79,&#966;<sub>mild</sub>(10-19),"Fraction of infected individuals with mild symptoms, aged 10-19",de Souza et al. 2020,Disease dynamics parameters
46-
mild_fraction_20_29,0.73,&#966;<sub>mild</sub>(20-29),"Fraction of infected individuals with mild symptoms, aged 20-29","Yang, Lu et al. 2020",Disease dynamics parameters
47-
mild_fraction_30_39,0.68,&#966;<sub>mild</sub>(30-39),"Fraction of infected individuals with mild symptoms, aged 30-39","Yang, Lu et al. 2020",Disease dynamics parameters
48-
mild_fraction_40_49,0.65,&#966;<sub>mild</sub>(40-49),"Fraction of infected individuals with mild symptoms, aged 40-49","Yang, Lu et al. 2020",Disease dynamics parameters
49-
mild_fraction_50_59,0.59,&#966;<sub>mild</sub>(50-59),"Fraction of infected individuals with mild symptoms, aged 50-59","Yang, Lu et al. 2020",Disease dynamics parameters
50-
mild_fraction_60_69,0.53,&#966;<sub>mild</sub>(60-69),"Fraction of infected individuals with mild symptoms, aged 60-69","Yang, Lu et al. 2020",Disease dynamics parameters
51-
mild_fraction_70_79,0.41,&#966;<sub>mild</sub>(70-79),"Fraction of infected individuals with mild symptoms, aged 70-79","Yang, Lu et al. 2020",Disease dynamics parameters
52-
mild_fraction_80,0.27,&#966;<sub>mild</sub>(80),"Fraction of infected individuals with mild symptoms, aged 80+","Yang, Lu et al. 2020",Disease dynamics parameters
44+
mild_fraction_0_9,0.224,&#966;<sub>mild</sub>(0-9),"Fraction of infected individuals with mild symptoms, aged 0-9",Riccardo et al. 2020,Disease dynamics parameters
45+
mild_fraction_10_19,0.212,&#966;<sub>mild</sub>(10-19),"Fraction of infected individuals with mild symptoms, aged 10-19",Riccardo et al. 2020,Disease dynamics parameters
46+
mild_fraction_20_29,0.198,&#966;<sub>mild</sub>(20-29),"Fraction of infected individuals with mild symptoms, aged 20-29",Riccardo et al. 2020,Disease dynamics parameters
47+
mild_fraction_30_39,0.181,&#966;<sub>mild</sub>(30-39),"Fraction of infected individuals with mild symptoms, aged 30-39",Riccardo et al. 2020,Disease dynamics parameters
48+
mild_fraction_40_49,0.162,&#966;<sub>mild</sub>(40-49),"Fraction of infected individuals with mild symptoms, aged 40-49",Riccardo et al. 2020,Disease dynamics parameters
49+
mild_fraction_50_59,0.140,&#966;<sub>mild</sub>(50-59),"Fraction of infected individuals with mild symptoms, aged 50-59",Riccardo et al. 2020,Disease dynamics parameters
50+
mild_fraction_60_69,0.117,&#966;<sub>mild</sub>(60-69),"Fraction of infected individuals with mild symptoms, aged 60-69",Riccardo et al. 2020,Disease dynamics parameters
51+
mild_fraction_70_79,0.0906,&#966;<sub>mild</sub>(70-79),"Fraction of infected individuals with mild symptoms, aged 70-79",Riccardo et al. 2020,Disease dynamics parameters
52+
mild_fraction_80,0.0623,&#966;<sub>mild</sub>(80),"Fraction of infected individuals with mild symptoms, aged 80+",Riccardo et al. 2020,Disease dynamics parameters
5353
mild_infectious_factor,0.48,*A<sub>mild</sub>*,Infectious rate of mildly symptomatic individuals relative to symptomatic individuals,Luo et al 2020,Infection parameters
5454
mean_asymptomatic_to_recovery,15,"&#956;<sub>a,rec</sub>",Mean time from infection to recovery (and no longer infectious) for an asymptomatic individual (days),Yang et al 2020,Disease dynamics parameters
5555
sd_asymptomatic_to_recovery,5,"&#963;<sub>a,rec</sub>",Standard deviation from infection to recovery for an asymptomatic individual (days),Yang et al 2020,Disease dynamics parameters
@@ -126,17 +126,17 @@ quarantine_length_traced_symptoms,14,,Maximum number of days quarantine for indi
126126
quarantine_length_traced_positive,14,,Maximum number of days quarantine for individuals who are traced after a contact tested positive,,Active intervention parameters
127127
quarantine_length_positive,14,,Maximum number of days quarantine for individuals with a positive test result,,Active intervention parameters
128128
quarantine_dropout_self,0.02,,Daily probability of drop out for an individual quarantining after self-reporting symptoms,,Passive intervention parameters
129-
quarantine_dropout_traced_symptoms,0.03,,Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms,,Active intervention parameters
129+
quarantine_dropout_traced_symptoms,0.04,,Daily probability of drop out for an individual quarantining after being traced following contact with an individual self-reporting symptoms,,Active intervention parameters
130130
quarantine_dropout_traced_positive,0.03,,Daily probability of drop out for an individual quarantining after being traced following contact with an individual who tested positive,,Active intervention parameters
131-
quarantine_dropout_positive,0.02,,Daily probability of drop out for an individual quarantining after a positive test result,,Active intervention parameters
132-
quarantine_compliance_traced_symptoms,0.8,,Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms,,Active intervention parameters
131+
quarantine_dropout_positive,0.01,,Daily probability of drop out for an individual quarantining after a positive test result,,Active intervention parameters
132+
quarantine_compliance_traced_symptoms,0.5,,Fraction of individuals who initially comply with a quarantine notification after their contact reported symptoms,,Active intervention parameters
133133
quarantine_compliance_traced_positive,0.9,,Fraction of individuals who initially comply with a quarantine notification after their contact tested positive,,Active intervention parameters
134134
test_on_symptoms,0,,"Test individuals who show symptoms (0=no, 1=yes)",,Active intervention parameters
135135
test_on_traced,0,,"Test individuals who have been contact-traced (0=no, 1=yes)",,Active intervention parameters
136136
test_release_on_negative,1,,"Release individuals following a negative test (0=no, 1=yes)",,Active intervention parameters
137137
trace_on_symptoms,0,,"Trace contacts of individuals who show symptoms (0=no, 1=yes)",,Active intervention parameters
138138
trace_on_positive,0,,"Trace contacts of an individual who tests positive (0=no, 1=yes)",,Active intervention parameters
139-
retrace_on_positive,0,,"Repeat contract tracing be carried out on a positive test if already tested on symptoms (0=no, 1=yes)",,Active intervention parameters
139+
retrace_on_positive,0,,"Repeat contract tracing be carried out on a positive test if already traced on symptoms (0=no, 1=yes)",,Active intervention parameters
140140
quarantine_on_traced,0,,"Quarantine individuals who are traced (0=no, 1=yes)",,Active intervention parameters
141141
traceable_interaction_fraction,0.8,,Fraction of interactions that are captured if both users have the app,,Active intervention parameters
142142
tracing_network_depth,0,,Depth of interaction network to contact,,Active intervention parameters
@@ -152,9 +152,9 @@ quarantine_days,7,,The number of previous days' contacts to be traced and contac
152152
quarantine_smart_release_day,0,,Release a chain of quarantined people if after this number of days nobody has shown symptoms on the chain,,Active intervention parameters
153153
hospitalised_daily_interactions,0,,Daily random interactions of a hospitalised individual,,Passive intervention parameters
154154
test_insensitive_period,3,,Number of days following infection the test is insensitive,Woelfel et al. 2020,Active intervention parameters
155-
test_sensitive_period,14,,Number of days following infection to end of period where test is sensitive,,Active intervention parameters
156-
test_sensitivity,0.8,,Sensitivity of test in the time where it is sensitive,,Active intervention parameters
157-
test_specificity,0.99,,Specificity of test (at any time),,Active intervention parameters
155+
test_sensitive_period,14,,Number of days following infection to end of period where test is sensitive,,Active intervention parameters
156+
test_sensitivity,0.8,,Sensitivity of test in the time where it is sensitive,,Active intervention parameters
157+
test_specificity,0.999,,Specificity of test (at any time),,Active intervention parameters
158158
test_order_wait,1,,Minimum number of days to wait to take a test,,Active intervention parameters
159159
test_order_wait_priority,-1,,Minimum number of days to wait for a priority test to be taken,,
160160
test_result_wait,1,,Number of days to wait for a test result,,Active intervention parameters

‎tests/hospital/test_hospital_logic.py

+2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def test_interaction_type_representative(self):
182182
# Adjust baseline parameter
183183
params = ParameterSet(constant.TEST_DATA_FILE, line_number=1)
184184
params.set_param("n_total", 20000)
185+
params.set_param("n_seed_infection", 1000)
185186
params.set_param("hospital_on", 1)
187+
params.set_param("end_time", 30)
186188
params.write_params(constant.TEST_DATA_FILE)
187189

188190
# Call the model using baseline parameters, pipe output to file, read output file

‎tests/test_interventions.py

+8-194
Original file line numberDiff line numberDiff line change
@@ -1083,22 +1083,14 @@ def test_quarantine_household_on_symptoms(self, test_params ):
10831083
df_int.rename( columns = { "ID_1":"index_ID", "ID_2":"traced_ID"}, inplace = True )
10841084
df_int[ "household" ] = ( df_int[ "house_no_1" ] == df_int[ "house_no_2" ] )
10851085
df_int = df_int.loc[ :, [ "index_ID", "traced_ID", "household"]]
1086-
1087-
# don't consider ones with multiple index events
1088-
df_trace["days_since_index"]=df_trace["time"]-df_trace["index_time"]
1089-
df_trace["days_since_contact"]=df_trace["index_time"]-df_trace["contact_time"]
1090-
filter_single = df_trace.groupby( ["index_ID", "days_since_index"] ).size();
1091-
filter_single = filter_single.groupby( ["index_ID"]).size().reset_index(name="N");
1092-
filter_single = filter_single[ filter_single[ "N"] == 1 ]
1093-
1086+
10941087
# look at the trace token data to get all traces
1095-
index_traced = df_trace[ ( df_trace[ "time" ] == end_time ) & ( df_trace[ "days_since_contact" ] == 0 ) ]
1088+
index_traced = df_trace[ ( df_trace[ "index_time" ] == end_time ) ]
10961089
index_traced = index_traced.groupby( [ "index_ID", "traced_ID" ] ).size().reset_index(name="cons")
10971090
index_traced[ "traced" ] = True
1098-
index_traced = pd.merge( index_traced, filter_single, on = "index_ID", how = "inner")
1099-
1091+
11001092
# get all the interactions for the index cases
1101-
index_cases = pd.DataFrame( data = { 'index_ID': index_traced.index_ID.unique() } )
1093+
index_cases = pd.DataFrame( data = { 'index_ID': index_traced.index_ID.unique() } )
11021094
index_inter = pd.merge( index_cases, df_int, on = "index_ID", how = "left" )
11031095
index_inter = index_inter.groupby( [ "index_ID", "traced_ID", "household" ]).size().reset_index(name="N")
11041096
index_inter[ "inter" ] = True
@@ -2054,7 +2046,7 @@ def test_recursive_testing(self, test_params ):
20542046

20552047
# now check that nobody has got a test ordered yet
20562048
df = pd.merge( df_trace_symp, df_indiv_1, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2057-
np.testing.assert_equal( len( df ) > 500, True, "In-sufficient traced from index symptomatic at symptomatic time" )
2049+
np.testing.assert_equal( len( df ) > 300, True, "In-sufficient traced from index symptomatic at symptomatic time" )
20582050
np.testing.assert_equal( sum( ( df[ "test_status"] != -2 ) ), 0, "Traced people getting a test after a symptomatic gets a positive test" )
20592051

20602052
# now step forward to when the symptomatic cases get their results back
@@ -2076,7 +2068,7 @@ def test_recursive_testing(self, test_params ):
20762068

20772069
# all those directly traced should now be asking for a test
20782070
df = pd.merge( df_trace_symp, df_indiv, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2079-
np.testing.assert_equal( len( df ) > 500, True, "In-sufficient traced from index symptomatic at symptomatic time" )
2071+
np.testing.assert_equal( len( df ) > 300, True, "In-sufficient traced from index symptomatic at symptomatic time" )
20802072
np.testing.assert_equal( sum( ( df[ "test_status"] != -1 ) ), 0, "Traced people not getting a test after a symptomatic gets a positive test" )
20812073

20822074
# now look at at everyone who is traced directly from a positive index case and only traced once
@@ -2093,7 +2085,7 @@ def test_recursive_testing(self, test_params ):
20932085
df = pd.merge( df, df_indiv_1, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
20942086
df = df[ df["test_status_1" ] == -2 ]
20952087

2096-
np.testing.assert_equal( len( df ) > 1000, True, "In-sufficient traced from index positive at end time " )
2088+
np.testing.assert_equal( len( df ) > 700, True, "In-sufficient traced from index positive at end time " )
20972089
np.testing.assert_equal( sum( df[ "test_status" ] != -1 ), 0, "Traced people not getting a test after new positive index case" )
20982090

20992091
del( model )
@@ -2254,182 +2246,4 @@ def test_manual_trace_delay(self, test_params, delay ):
22542246
np.testing.assert_equal( sum( df_manual_trace[ "count" ] == 1 ), 0, "No manual tracing occurred from index case" )
22552247

22562248

2257-
def test_recursive_testing(self, test_params ):
2258-
"""
2259-
Test checks that following a positive test for an index case we order a
2260-
test for all directly traced people
2261-
2262-
Additionally checks that when a symptomatic index case receives a positive test
2263-
tests are ordered for all directly traced people
2264-
"""
2265-
end_time = test_params[ "end_time" ]
2266-
symp_time = end_time - test_params[ "test_order_wait" ] - test_params[ "test_result_wait" ]
2267-
2268-
params = utils.get_params_swig()
2269-
for param, value in test_params.items():
2270-
params.set_param( param, value )
2271-
model = utils.get_model_swig( params )
2272-
2273-
for time in range( symp_time ):
2274-
model.one_time_step()
2275-
2276-
# get the test status at the point of becoming an index case
2277-
model.write_trace_tokens()
2278-
model.write_individual_file()
2279-
2280-
# remove those traced by more than one index and the index cases who have been traced
2281-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2282-
df_trace_uniq = df_trace.groupby("traced_ID").size().reset_index(name="n_traced")
2283-
df_trace_uniq = df_trace_uniq[df_trace_uniq["n_traced"] == 1 ]
2284-
df_trace = pd.merge( df_trace, df_trace_uniq, on = "traced_ID", how = "left" )
2285-
df_trace_uniq.rename(columns={"traced_ID":"index_ID","n_traced":"n_traced_index"}, inplace = True)
2286-
df_trace = pd.merge( df_trace, df_trace_uniq, on = "index_ID", how = "left" )
2287-
df_trace = df_trace[ ( df_trace[ "n_traced"] == 1 ) & ( df_trace[ "n_traced_index"] == 1 )]
2288-
2289-
# now get the new index case who have traced more than one and just get the direct traced
2290-
df_trace_symp = df_trace[ ( df_trace[ "index_time" ] == symp_time ) & ( df_trace["index_reason"] == 0 ) ]
2291-
df_trace_symp = df_trace_symp.groupby(["index_time","index_ID"]).size().reset_index(name="n_traced")
2292-
df_trace_symp = df_trace_symp[ df_trace_symp["n_traced"] > 1 ]
2293-
df_trace_symp["pos_at_symp"] = True
2294-
df_trace_symp = pd.merge(df_trace_symp, df_trace, on = ["index_time","index_ID"], how = "left")
2295-
df_trace_symp = df_trace_symp[ ( df_trace_symp["index_ID"] != df_trace_symp["traced_ID"])]
2296-
df_trace_symp = df_trace_symp[ ( df_trace_symp["index_ID"] == df_trace_symp["traced_from_ID"])]
2297-
df_trace_symp = df_trace_symp.loc[:,["index_time","index_ID","traced_ID",]]
2298-
2299-
# go to step before symptomatic index cases get their test results back to get the status of those traced
2300-
for time in range( end_time - symp_time - 1 ):
2301-
model.one_time_step()
2302-
2303-
# write files
2304-
model.write_trace_tokens()
2305-
model.write_individual_file()
2306-
model.write_transmissions()
2307-
df_trans = pd.read_csv(constant.TEST_TRANSMISSION_FILE)
2308-
df_indiv_1 = pd.read_csv(constant.TEST_INDIVIDUAL_FILE)
2309-
df_indiv_1 = pd.merge(df_indiv_1, df_trans, left_on = "ID", right_on = "ID_recipient", how = "left")
2310-
2311-
# remove those who have been traced multiple times from the original list
2312-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2313-
df_trace_uniq = df_trace.groupby("traced_ID").size().reset_index(name="n_traced_end_1")
2314-
df_trace_symp = pd.merge( df_trace_symp, df_trace_uniq, on = "traced_ID", how = "left" )
2315-
df_trace_symp = df_trace_symp[df_trace_symp["n_traced_end_1"] == 1 ]
2316-
2317-
# now check that nobody has got a test ordered yet
2318-
df = pd.merge( df_trace_symp, df_indiv_1, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2319-
np.testing.assert_equal( len( df ) > 500, True, "In-sufficient traced from index symptomatic at symptomatic time" )
2320-
np.testing.assert_equal( sum( ( df[ "test_status"] != -2 ) ), 0, "Traced people getting a test after a symptomatic gets a positive test" )
2321-
2322-
# now step forward to when the symptomatic cases get their results back
2323-
model.one_time_step()
2324-
2325-
# write files
2326-
model.write_trace_tokens()
2327-
model.write_individual_file()
2328-
model.write_transmissions()
2329-
df_trans = pd.read_csv(constant.TEST_TRANSMISSION_FILE)
2330-
df_indiv = pd.read_csv(constant.TEST_INDIVIDUAL_FILE)
2331-
df_indiv = pd.merge(df_indiv, df_trans, left_on = "ID", right_on = "ID_recipient", how = "left")
2332-
2333-
# remove those who have been traced multiple times from the original list
2334-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2335-
df_trace_uniq = df_trace.groupby("traced_ID").size().reset_index(name="n_traced_end")
2336-
df_trace_symp = pd.merge( df_trace_symp, df_trace_uniq, on = "traced_ID", how = "left" )
2337-
df_trace_symp = df_trace_symp[df_trace_symp["n_traced_end"] == 1 ]
2338-
2339-
# all those directly traced should now be asking for a test
2340-
df = pd.merge( df_trace_symp, df_indiv, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2341-
np.testing.assert_equal( len( df ) > 500, True, "In-sufficient traced from index symptomatic at symptomatic time" )
2342-
np.testing.assert_equal( sum( ( df[ "test_status"] != -1 ) ), 0, "Traced people not getting a test after a symptomatic gets a positive test" )
2343-
2344-
# now look at at everyone who is traced directly from a positive index case and only traced once
2345-
df_trace = pd.merge( df_trace, df_trace_uniq, on = "traced_ID", how = "left" )
2346-
df_trace = df_trace[df_trace["n_traced_end"] == 1 ]
2347-
df_trace = df_trace[ ( df_trace[ "index_time" ] == end_time ) & ( df_trace["index_reason"] == 1 ) ]
2348-
df_trace = df_trace[ ( df_trace[ "index_ID" ] == df_trace[ "traced_from_ID" ] )]
2349-
df_trace = df_trace[ ( df_trace[ "index_ID" ] != df_trace[ "traced_ID" ] )]
2350-
df = pd.merge( df_trace, df_indiv, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2351-
2352-
# remove traced people who were waiting for a test already
2353-
df_indiv_1 = df_indiv_1.loc[:,["ID","test_status"]]
2354-
df_indiv_1.rename(columns={"test_status":"test_status_1"},inplace=True)
2355-
df = pd.merge( df, df_indiv_1, left_on = [ "traced_ID"], right_on = ["ID"], how = "left")
2356-
df = df[ df["test_status_1" ] == -2 ]
2357-
2358-
np.testing.assert_equal( len( df ) > 1000, True, "In-sufficient traced from index positive at end time " )
2359-
np.testing.assert_equal( sum( df[ "test_status" ] != -1 ), 0, "Traced people not getting a test after new positive index case" )
2360-
2361-
del( model )
2362-
2363-
def test_recursive_testing_household_not_released(self, test_params ):
2364-
"""
2365-
Test that when recursively tested people that if a household
2366-
member of an index case tests negative they do not get released
2367-
if the index case has tested positive
2368-
"""
2369-
end_time = test_params[ "end_time" ]
2370-
index_time = end_time - 2 * ( test_params[ "test_order_wait" ] + test_params[ "test_result_wait" ] )
2371-
2372-
params = utils.get_params_swig()
2373-
for param, value in test_params.items():
2374-
params.set_param( param, value )
2375-
model = utils.get_model_swig( params )
2376-
2377-
for time in range( index_time ):
2378-
model.one_time_step()
2379-
2380-
# get the symptomatic index cases
2381-
model.write_trace_tokens()
2382-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2383-
df_symp = df_trace[ df_trace[ "index_time"] == index_time ]
2384-
df_symp = df_symp[ df_symp["index_reason"] == 0].groupby( ["index_time", "index_ID"]).size().reset_index( name ="n_traced_symp")
2385-
2386-
for time in range( end_time - index_time - 1 ):
2387-
model.one_time_step()
2388-
2389-
# get the test results
2390-
model.write_individual_file()
2391-
model.write_trace_tokens()
2392-
df_indiv = pd.read_csv(constant.TEST_INDIVIDUAL_FILE)
2393-
df_indiv = df_indiv.loc[:,["ID","test_status","house_no", "current_status", "quarantined"]]
2394-
2395-
# first filter out all those who have been traced multiple times
2396-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2397-
df_n_trace = df_trace.groupby( "traced_ID" ).size().reset_index(name="n_trace")
2398-
df_n_trace.rename( columns={"traced_ID":"index_ID"}, inplace = True )
2399-
df_trace = pd.merge( df_trace, df_n_trace, on = "index_ID" )
2400-
df_trace = df_trace[ (df_trace["n_trace"] == 1 ) ]
2401-
2402-
# just look at those who were symptomatic when they became index cases but are now positive
2403-
df_trace = pd.merge( df_symp, df_trace, on = [ "index_time", "index_ID"], how = "inner" )
2404-
df_trace = df_trace[ df_trace[ "index_reason"] == 1 ]
2405-
2406-
# next filter out those who have no susceptibles in their house
2407-
df_house = df_indiv.loc[:,["ID","house_no"]]
2408-
df_house.rename( columns={"ID":"index_ID", "house_no":"index_house_no"}, inplace = True )
2409-
df_trace = pd.merge( df_trace, df_house, on = "index_ID" )
2410-
df_trace = pd.merge( df_trace, df_indiv, left_on = "traced_ID", right_on = "ID" )
2411-
df_trace = df_trace[ ( df_trace[ "house_no" ] == df_trace[ "index_house_no" ]) ]
2412-
df_n_trace = df_trace.groupby( "index_ID" ).size().reset_index(name="n_traced")
2413-
df_n_trace = df_n_trace[ (df_n_trace["n_traced"] > 1 ) ]
2414-
df_trace = pd.merge( df_n_trace, df_trace, on = "index_ID")
2415-
2416-
# get those with negative and positive test
2417-
df_neg = df_trace[ df_trace["test_status"] == 0 ].loc[:,["index_ID", "traced_ID"]]
2418-
2419-
# make sure that they still have the trace token on the next step
2420-
model.one_time_step()
2421-
model.write_trace_tokens()
2422-
model.write_individual_file()
2423-
df_trace = df_trace.loc[:,["index_ID", "traced_ID"]]
2424-
df_trace = pd.read_csv( constant.TEST_TRACE_FILE, comment="#", sep=",", skipinitialspace=True )
2425-
df_trace[ "has_token"] = True
2426-
df_indiv = pd.read_csv(constant.TEST_INDIVIDUAL_FILE)
2427-
df_indiv = df_indiv.loc[:,["ID","quarantined"]]
2428-
df_trace = pd.merge( df_trace, df_indiv, left_on = "traced_ID", right_on = "ID", how = "left")
2429-
df_neg = pd.merge( df_neg, df_trace, on = [ "index_ID", "traced_ID"], how = "left" )
2430-
2431-
np.testing.assert_equal( len( df_neg) > 100, True, "In-sufficient household member with negative test results" )
2432-
np.testing.assert_equal( sum( df_neg["has_token"] != True ), 0, "Household members lose their token on a negative result despite positive household member" )
2433-
np.testing.assert_equal( sum( df_neg["quarantined"]==0), 0, "Household members released from quarantine despite positive household member" )
2434-
2435-
2249+

0 commit comments

Comments
 (0)
Please sign in to comment.