From 2daf51228e7a50a33c97cec02e7ee1c1e89a6173 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Mon, 24 May 2021 13:58:50 -0400 Subject: [PATCH 01/13] feat: create rhode island setting files --- titan/settings/rhode-island/demographics.yml | 121 +++++++++++++++++++ titan/settings/rhode-island/model.yml | 105 ++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 titan/settings/rhode-island/demographics.yml create mode 100644 titan/settings/rhode-island/model.yml diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml new file mode 100644 index 00000000..05a55af7 --- /dev/null +++ b/titan/settings/rhode-island/demographics.yml @@ -0,0 +1,121 @@ +demographics: + white: + ppl: 0.562 + sex_type: + MSM: + ppl: 1.0 + sex_role: + init: + versatile: 0.380 + insertive: 0.356 + receptive: 0.264 + safe_sex: + Sex: + prob: 0.234 + prep: + discontinue: 0.125 + adherence: 0.75 + init: 0.070 + cap: 0.03 + drug_type: + None: + ppl: 1.0 + hiv: + init: 0.280 + dx: + init: 0.881 + prob: 0.063 + aids: + init: 0.496 + haart: + init: 0.708 + enroll: + enroll_1: + start: 0 + stop: 2 + prob: 0.579 + enroll_2: + start: 2 + stop: 13 + prob: 0.034 + reinit: + prob: 0.03 + adherence: + init: 0.667 + prob: 0.112 + discontinue: 0.034 + death_rate: + base: 0.902 + hiv: 3.0 + aids: 17.5 + haart_adherent: 1.0 + num_partners: + Sex: + dist_type: negative_binomial + vars: + 1: + value: 5.609 + value_type: float + 2: + value: 0.381 + value_type: float + black: + ppl: 0.438 + sex_type: + MSM: + ppl: 1.0 + sex_role: + init: + versatile: 0.365 + insertive: 0.399 + receptive: 0.236 + safe_sex: + Sex: + prob: 0.391 + prep: + discontinue: 0.125 + adherence: 0.75 + init: 0.050 + cap: 0.03 + drug_type: + None: + ppl: 1.0 + hiv: + init: 0.403 + dx: + init: 0.804 + prob: 0.065 + aids: + init: 0.489 + haart: + init: 0.763 + enroll: + enroll_1: + start: 0 + stop: 2 + prob: 0.579 + enroll_2: + start: 2 + stop: 13 + prob: 0.061 + reinit: + prob: 0.03 + adherence: + init: 0.514 + prob: 0.103 + discontinue: 0.029 + death_rate: + base: 1.674 + hiv: 3.0 + aids: 17.5 + haart_adherent: 1.0 + num_partners: + Sex: + dist_type: negative_binomial + vars: + 1: + value: 9.634 + value_type: float + 2: + value: 0.611 + value_type: float diff --git a/titan/settings/rhode-island/model.yml b/titan/settings/rhode-island/model.yml new file mode 100644 index 00000000..3efc7b6c --- /dev/null +++ b/titan/settings/rhode-island/model.yml @@ -0,0 +1,105 @@ +model: + num_pop: 14500 + time: + num_steps: 84 + steps_per_year: 12 + burn_steps: 48 + +features: + prep: true + haart: true + die_and_replace: true + assort_mix: true + +classes: + sex_types: + MSM: + cis_trans: cis + gender: M + sleeps_with: + - MSM + +assort_mix: + assort_white: + attribute: race + agent_value: white + partner_values: + white: 0.5 + black: 0.5 + assort_black: + attribute: race + agent_value: black + partner_values: + white: 0.5 + black: 0.5 + +partnership: + sex: + frequency: + Sex: + type: distribution + distribution: + dist_type: gamma + vars: + 1: + value: 3.414 + value_type: float + 2: + value: 0.562 + value_type: float + acquisition: + MSM: + versatile: 0.0046 # mean of insertive and receptive + insertive: 0.0017 + receptive: 0.0075 + haart_scaling: + MSM: + non_adherent: 0.165 + adherent: 0 + duration: + Sex: + white: + type: distribution + distribution: + dist_type: weibull_modified + vars: + 1: + value: 2.522 + value_type: float + 2: + value: 13.144 + value_type: float + mean: 11 # expected means + black: + type: distribution + distribution: + dist_type: weibull_modified + vars: + 1: + value: 2.956 + value_type: float + 2: + value: 8.953 + value_type: float + mean: 9 # expected means + +prep: + cap_as_prob: true + efficacy: + adherent: 0.96 + non_adherent: 0.76 + target_model: + - Racial + +hiv: + acute: + infectivity: 10.5 + duration: 4 + aids: + prob: 0.004 + +haart: + use_reinit: true + aids_scale: + non_adherent: 0.200 + adherent: 0.05 From a769618812fb09b30dda2563a73c80164b9ecaa5 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Mon, 24 May 2021 14:33:45 -0400 Subject: [PATCH 02/13] feat: add rhode island values --- titan/settings/rhode-island/demographics.yml | 100 +++++++++---------- titan/settings/rhode-island/model.yml | 3 + 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml index 05a55af7..c06e111a 100644 --- a/titan/settings/rhode-island/demographics.yml +++ b/titan/settings/rhode-island/demographics.yml @@ -1,6 +1,6 @@ demographics: white: - ppl: 0.562 + ppl: 0.845 sex_type: MSM: ppl: 1.0 @@ -13,39 +13,39 @@ demographics: Sex: prob: 0.234 prep: - discontinue: 0.125 - adherence: 0.75 - init: 0.070 - cap: 0.03 + discontinue: # need value + adherence: # need value + init: # need value + cap: # need value drug_type: None: ppl: 1.0 hiv: - init: 0.280 + init: 0.062 dx: init: 0.881 prob: 0.063 aids: - init: 0.496 + init: 0.493 haart: - init: 0.708 - enroll: + init: # need value + enroll: # need value enroll_1: - start: 0 - stop: 2 - prob: 0.579 + start: + stop: + prob: enroll_2: - start: 2 - stop: 13 - prob: 0.034 + start: + stop: + prob: reinit: - prob: 0.03 + prob: # need value adherence: - init: 0.667 + init: # need value prob: 0.112 - discontinue: 0.034 + discontinue: # need value death_rate: - base: 0.902 + base: 0.119 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 @@ -54,58 +54,58 @@ demographics: dist_type: negative_binomial vars: 1: - value: 5.609 + value: # need numbers value_type: float 2: - value: 0.381 + value: # need numbers value_type: float - black: - ppl: 0.438 + latino: + ppl: 0.145 sex_type: MSM: ppl: 1.0 sex_role: init: - versatile: 0.365 - insertive: 0.399 - receptive: 0.236 + versatile: 0.418 + insertive: 0.333 + receptive: 0.249 safe_sex: Sex: - prob: 0.391 + prob: 0.312 prep: - discontinue: 0.125 - adherence: 0.75 - init: 0.050 - cap: 0.03 + discontinue: # need value + adherence: # need value + init: # need value + cap: # need value drug_type: None: ppl: 1.0 hiv: - init: 0.403 + init: 0.116 dx: - init: 0.804 - prob: 0.065 + init: 0.799 + prob: 0.063 aids: - init: 0.489 + init: 0.446 haart: - init: 0.763 - enroll: + init: # need value + enroll: # need value enroll_1: - start: 0 - stop: 2 - prob: 0.579 + start: + stop: + prob: enroll_2: - start: 2 - stop: 13 - prob: 0.061 + start: + stop: + prob: reinit: - prob: 0.03 + prob: # need value adherence: - init: 0.514 - prob: 0.103 - discontinue: 0.029 + init: # need value + prob: 0.116 + discontinue: # need value death_rate: - base: 1.674 + base: 0.246 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 @@ -114,8 +114,8 @@ demographics: dist_type: negative_binomial vars: 1: - value: 9.634 + value: # need numbers value_type: float 2: - value: 0.611 + value: # need numbers value_type: float diff --git a/titan/settings/rhode-island/model.yml b/titan/settings/rhode-island/model.yml index 3efc7b6c..b11f214c 100644 --- a/titan/settings/rhode-island/model.yml +++ b/titan/settings/rhode-island/model.yml @@ -12,6 +12,9 @@ features: assort_mix: true classes: + races: + latino: + hispanic: true # need to confirm sex_types: MSM: cis_trans: cis From 64ada2063611e29ca34f35a25e05b90b82121e14 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Mon, 24 May 2021 14:48:05 -0400 Subject: [PATCH 03/13] feat: update values in model.yml --- titan/settings/rhode-island/model.yml | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/titan/settings/rhode-island/model.yml b/titan/settings/rhode-island/model.yml index b11f214c..1f3987c7 100644 --- a/titan/settings/rhode-island/model.yml +++ b/titan/settings/rhode-island/model.yml @@ -27,14 +27,14 @@ assort_mix: attribute: race agent_value: white partner_values: - white: 0.5 - black: 0.5 - assort_black: + white: # need value + latino: # need value + assort_latino: attribute: race - agent_value: black + agent_value: latino partner_values: - white: 0.5 - black: 0.5 + white: # need value + latino: # need value partnership: sex: @@ -45,10 +45,10 @@ partnership: dist_type: gamma vars: 1: - value: 3.414 + value: # need value value_type: float 2: - value: 0.562 + value: # need value value_type: float acquisition: MSM: @@ -67,24 +67,24 @@ partnership: dist_type: weibull_modified vars: 1: - value: 2.522 + value: # need value value_type: float 2: - value: 13.144 + value: # need value value_type: float - mean: 11 # expected means - black: + mean: # expected means + latino: type: distribution distribution: dist_type: weibull_modified vars: 1: - value: 2.956 + value: # need value value_type: float 2: - value: 8.953 + value: # need value value_type: float - mean: 9 # expected means + mean: # expected means prep: cap_as_prob: true From 823b02c6a3fe6b9f3e8d8fc1c9a25b6aa94781fd Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Wed, 26 May 2021 15:17:51 -0400 Subject: [PATCH 04/13] feat: add in missing parameter values --- titan/settings/rhode-island/demographics.yml | 68 ++++++++++---------- titan/settings/rhode-island/model.yml | 26 ++++---- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml index c06e111a..5faff49d 100644 --- a/titan/settings/rhode-island/demographics.yml +++ b/titan/settings/rhode-island/demographics.yml @@ -13,10 +13,10 @@ demographics: Sex: prob: 0.234 prep: - discontinue: # need value - adherence: # need value - init: # need value - cap: # need value + discontinue: 0.125 + adherence: 0.75 + init: 0.045 + cap: 0.03 drug_type: None: ppl: 1.0 @@ -28,22 +28,22 @@ demographics: aids: init: 0.493 haart: - init: # need value - enroll: # need value + init: 0.723 + enroll: enroll_1: - start: - stop: - prob: + start: 0 + stop: 2 + prob: 0.918 enroll_2: - start: - stop: - prob: + start: 2 + stop: 13 + prob: 0.004 reinit: - prob: # need value + prob: 0.03 adherence: - init: # need value + init: 0.676 prob: 0.112 - discontinue: # need value + discontinue: 0.022 death_rate: base: 0.119 hiv: 3.0 @@ -54,10 +54,10 @@ demographics: dist_type: negative_binomial vars: 1: - value: # need numbers + value: 5.0 value_type: float 2: - value: # need numbers + value: 0.40 value_type: float latino: ppl: 0.145 @@ -73,10 +73,10 @@ demographics: Sex: prob: 0.312 prep: - discontinue: # need value - adherence: # need value - init: # need value - cap: # need value + discontinue: 0.125 + adherence: 0.75 + init: 0.045 + cap: 0.03 drug_type: None: ppl: 1.0 @@ -88,22 +88,22 @@ demographics: aids: init: 0.446 haart: - init: # need value - enroll: # need value + init: 0.681 + enroll: enroll_1: - start: - stop: - prob: + start: 0 + stop: 2 + prob: 0.911 enroll_2: - start: - stop: - prob: + start: 2 + stop: 13 + prob: 0.006 reinit: - prob: # need value + prob: 0.03 adherence: - init: # need value + init: 0.608 prob: 0.116 - discontinue: # need value + discontinue: 0.021 death_rate: base: 0.246 hiv: 3.0 @@ -114,8 +114,8 @@ demographics: dist_type: negative_binomial vars: 1: - value: # need numbers + value: 4.0 value_type: float 2: - value: # need numbers + value: 0.50 value_type: float diff --git a/titan/settings/rhode-island/model.yml b/titan/settings/rhode-island/model.yml index 1f3987c7..806cffed 100644 --- a/titan/settings/rhode-island/model.yml +++ b/titan/settings/rhode-island/model.yml @@ -14,7 +14,7 @@ features: classes: races: latino: - hispanic: true # need to confirm + hispanic: true sex_types: MSM: cis_trans: cis @@ -27,14 +27,14 @@ assort_mix: attribute: race agent_value: white partner_values: - white: # need value - latino: # need value + white: 0.5 + latino: 0.5 assort_latino: attribute: race agent_value: latino partner_values: - white: # need value - latino: # need value + white: 0.5 + latino: 0.5 partnership: sex: @@ -45,10 +45,10 @@ partnership: dist_type: gamma vars: 1: - value: # need value + value: 2.0 value_type: float 2: - value: # need value + value: 0.6 value_type: float acquisition: MSM: @@ -67,24 +67,24 @@ partnership: dist_type: weibull_modified vars: 1: - value: # need value + value: 1.31 value_type: float 2: - value: # need value + value: 5.71 value_type: float - mean: # expected means + mean: 5 latino: type: distribution distribution: dist_type: weibull_modified vars: 1: - value: # need value + value: 1.30 value_type: float 2: - value: # need value + value: 4.64 value_type: float - mean: # expected means + mean: 4 prep: cap_as_prob: true From 460f2225939b56933cddd155bd66c2dbaadbfb97 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Wed, 26 May 2021 15:41:24 -0400 Subject: [PATCH 05/13] feat: fix latino proportion --- titan/settings/rhode-island/demographics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml index 5faff49d..d0ee5ec1 100644 --- a/titan/settings/rhode-island/demographics.yml +++ b/titan/settings/rhode-island/demographics.yml @@ -60,7 +60,7 @@ demographics: value: 0.40 value_type: float latino: - ppl: 0.145 + ppl: 0.155 sex_type: MSM: ppl: 1.0 From 5ec8f90d2a1db04f3c354b9d30d86e5819b8b759 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Wed, 26 May 2021 16:59:46 -0400 Subject: [PATCH 06/13] feat: add white agent class --- titan/settings/rhode-island/model.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/titan/settings/rhode-island/model.yml b/titan/settings/rhode-island/model.yml index 806cffed..bdd0b405 100644 --- a/titan/settings/rhode-island/model.yml +++ b/titan/settings/rhode-island/model.yml @@ -13,6 +13,8 @@ features: classes: races: + white: + hispanic: false latino: hispanic: true sex_types: From 66ebabad73c91e138fb601dbab36bed31a054d35 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Thu, 27 May 2021 11:08:45 -0400 Subject: [PATCH 07/13] feat: fix base death rates --- titan/settings/rhode-island/demographics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml index d0ee5ec1..5bfc3fce 100644 --- a/titan/settings/rhode-island/demographics.yml +++ b/titan/settings/rhode-island/demographics.yml @@ -45,7 +45,7 @@ demographics: prob: 0.112 discontinue: 0.022 death_rate: - base: 0.119 + base: 4.565 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 @@ -105,7 +105,7 @@ demographics: prob: 0.116 discontinue: 0.021 death_rate: - base: 0.246 + base: 2.259 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 From 5eb8320fcf0e71ea214e4dfdf36cc59693088726 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Thu, 27 May 2021 13:50:38 -0400 Subject: [PATCH 08/13] feat: fix base death rates --- titan/settings/missouri/demographics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/titan/settings/missouri/demographics.yml b/titan/settings/missouri/demographics.yml index 05a55af7..1ced20a0 100644 --- a/titan/settings/missouri/demographics.yml +++ b/titan/settings/missouri/demographics.yml @@ -45,7 +45,7 @@ demographics: prob: 0.112 discontinue: 0.034 death_rate: - base: 0.902 + base: 5.399 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 @@ -105,7 +105,7 @@ demographics: prob: 0.103 discontinue: 0.029 death_rate: - base: 1.674 + base: 12.228 hiv: 3.0 aids: 17.5 haart_adherent: 1.0 From 801cde15b5cfce3a10cae8ee17fca1de7094b9bf Mon Sep 17 00:00:00 2001 From: sbessey Date: Fri, 28 May 2021 10:12:32 -0400 Subject: [PATCH 09/13] fix(timeline-scaling): timeline scaling should impact both general and location params Scaling was skipping location-specific params, but unscaling was capturing all params, leading to strange behavior. --- titan/model.py | 4 ++-- titan/settings/mississippi/model.yml | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/titan/model.py b/titan/model.py index 164f7fb7..4041de49 100644 --- a/titan/model.py +++ b/titan/model.py @@ -320,9 +320,9 @@ def timeline_scaling(self): return None # gather all of the param objectss to be scaled - params_set = {self.params} + params_set = [self.params] for location in self.pop.geography.locations.values(): - params_set.add(location.params) + params_set.append(location.params) # iterate over each param and update the values if the time is right for params in params_set: diff --git a/titan/settings/mississippi/model.yml b/titan/settings/mississippi/model.yml index 599fbbda..dd17e032 100644 --- a/titan/settings/mississippi/model.yml +++ b/titan/settings/mississippi/model.yml @@ -91,13 +91,5 @@ hiv: aids: prob: 0.00207 -timeline_scaling: - timeline: - haart_viral_suppression_scale: - parameter: demographics|black|MSM|haart|adherence - start_time: -47 - stop_time: 100 - scalar: 0.1088 - calibration: test_frequency: 0.55 From 84bf3c6934575e8e20b8b5db799dcd18406afd11 Mon Sep 17 00:00:00 2001 From: sbessey Date: Fri, 28 May 2021 10:13:42 -0400 Subject: [PATCH 10/13] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 51a1d98d..5a08f192 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "titan-model" -version = "2.6.1" +version = "2.6.2" description = "TITAN Agent Based Model" license = "GPL-3.0-only" authors = ["Sam Bessey ", "Mary McGrath "] From 396480bd2bc71cd3f53db276f4de870e3ed21538 Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Fri, 28 May 2021 10:46:58 -0400 Subject: [PATCH 11/13] feat: add in first review edits --- titan/settings/rhode-island/demographics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/titan/settings/rhode-island/demographics.yml b/titan/settings/rhode-island/demographics.yml index 5bfc3fce..a45460ce 100644 --- a/titan/settings/rhode-island/demographics.yml +++ b/titan/settings/rhode-island/demographics.yml @@ -16,7 +16,7 @@ demographics: discontinue: 0.125 adherence: 0.75 init: 0.045 - cap: 0.03 + cap: 0.003 drug_type: None: ppl: 1.0 @@ -76,7 +76,7 @@ demographics: discontinue: 0.125 adherence: 0.75 init: 0.045 - cap: 0.03 + cap: 0.003 drug_type: None: ppl: 1.0 From 07f9fecec2e64f75e113dff5b1007a78aa8c516d Mon Sep 17 00:00:00 2001 From: Carolyn Park Date: Fri, 28 May 2021 11:42:52 -0400 Subject: [PATCH 12/13] feat: reduce prep init range --- titan/settings/missouri/demographics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/titan/settings/missouri/demographics.yml b/titan/settings/missouri/demographics.yml index 1ced20a0..4e07afa2 100644 --- a/titan/settings/missouri/demographics.yml +++ b/titan/settings/missouri/demographics.yml @@ -16,7 +16,7 @@ demographics: discontinue: 0.125 adherence: 0.75 init: 0.070 - cap: 0.03 + cap: 0.003 drug_type: None: ppl: 1.0 @@ -76,7 +76,7 @@ demographics: discontinue: 0.125 adherence: 0.75 init: 0.050 - cap: 0.03 + cap: 0.003 drug_type: None: ppl: 1.0 From bcde57481ac7d5cd83dca395138f0d28fde52b71 Mon Sep 17 00:00:00 2001 From: Sam Bessey Date: Wed, 2 Jun 2021 09:29:50 -0400 Subject: [PATCH 13/13] Correct version number --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5a08f192..06633311 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "titan-model" -version = "2.6.2" +version = "2.7.0" description = "TITAN Agent Based Model" license = "GPL-3.0-only" authors = ["Sam Bessey ", "Mary McGrath "]