Skip to content

Commit

Permalink
Merge pull request #198 from pph-collective/develop
Browse files Browse the repository at this point in the history
Fix timeline scaling; add settings
  • Loading branch information
s-bessey authored Jun 2, 2021
2 parents 4dc15bd + bcde574 commit 7aeabc7
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "titan-model"
version = "2.6.1"
version = "2.7.0"
description = "TITAN Agent Based Model"
license = "GPL-3.0-only"
authors = ["Sam Bessey <[email protected]>", "Mary McGrath <[email protected]>"]
Expand Down
4 changes: 2 additions & 2 deletions titan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions titan/settings/mississippi/model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions titan/settings/missouri/demographics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
121 changes: 121 additions & 0 deletions titan/settings/rhode-island/demographics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
demographics:
white:
ppl: 0.845
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.045
cap: 0.003
drug_type:
None:
ppl: 1.0
hiv:
init: 0.062
dx:
init: 0.881
prob: 0.063
aids:
init: 0.493
haart:
init: 0.723
enroll:
enroll_1:
start: 0
stop: 2
prob: 0.918
enroll_2:
start: 2
stop: 13
prob: 0.004
reinit:
prob: 0.03
adherence:
init: 0.676
prob: 0.112
discontinue: 0.022
death_rate:
base: 4.565
hiv: 3.0
aids: 17.5
haart_adherent: 1.0
num_partners:
Sex:
dist_type: negative_binomial
vars:
1:
value: 5.0
value_type: float
2:
value: 0.40
value_type: float
latino:
ppl: 0.155
sex_type:
MSM:
ppl: 1.0
sex_role:
init:
versatile: 0.418
insertive: 0.333
receptive: 0.249
safe_sex:
Sex:
prob: 0.312
prep:
discontinue: 0.125
adherence: 0.75
init: 0.045
cap: 0.003
drug_type:
None:
ppl: 1.0
hiv:
init: 0.116
dx:
init: 0.799
prob: 0.063
aids:
init: 0.446
haart:
init: 0.681
enroll:
enroll_1:
start: 0
stop: 2
prob: 0.911
enroll_2:
start: 2
stop: 13
prob: 0.006
reinit:
prob: 0.03
adherence:
init: 0.608
prob: 0.116
discontinue: 0.021
death_rate:
base: 2.259
hiv: 3.0
aids: 17.5
haart_adherent: 1.0
num_partners:
Sex:
dist_type: negative_binomial
vars:
1:
value: 4.0
value_type: float
2:
value: 0.50
value_type: float
110 changes: 110 additions & 0 deletions titan/settings/rhode-island/model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
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:
races:
white:
hispanic: false
latino:
hispanic: true
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
latino: 0.5
assort_latino:
attribute: race
agent_value: latino
partner_values:
white: 0.5
latino: 0.5

partnership:
sex:
frequency:
Sex:
type: distribution
distribution:
dist_type: gamma
vars:
1:
value: 2.0
value_type: float
2:
value: 0.6
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: 1.31
value_type: float
2:
value: 5.71
value_type: float
mean: 5
latino:
type: distribution
distribution:
dist_type: weibull_modified
vars:
1:
value: 1.30
value_type: float
2:
value: 4.64
value_type: float
mean: 4

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

0 comments on commit 7aeabc7

Please sign in to comment.