-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_hiv_synthesis.sas
16788 lines (13445 loc) · 902 KB
/
example_hiv_synthesis.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
* === ABOUT THIS PROGRAM === *
--
This is the unified hiv synthesis program for sub saharan africa.
All programs run on legion/myriad for presentations/publications will use this program.
When running to address a specific research question the only parts of the program that may differ from this core program are
the "options code" section and the the "update code" and the file name specified in the output file at the end of the program.
In addition the section parameter values sampled can be replaced by reading an existing set of values for these parameters.
Proposed approach to new evaluations: For example, consider the evaluation of 6 potential art strategies. Suggest we use two approaches for the
evaluation.
1. (as currently programmed below as of 29 aug 2019) the reference (comparator) art strategy is option 0, for each run there is a possibility of
each of the 6 alternatives as option 1. Several evaluations for different questions can be evaluated simultaneously. A regression model of
difference between option 1 and 0 (on some outcome such as incidence, DALYS, net DALYs) on the parameters relevant for each evaluation is fitted on
the outputs to isolate the effects for each evaluation. (an alterative to this that we could consider is to run 2 random "option 1s" for each run
rather than always run an option 0 (no new intervention)
2. all 6 options are run simultaneously for each model run (options 0 to 5), with no other interventions differing across these 6 options. The
programming of other interventions means that we are able to consider this comaparison against a background of different future changes in other
interventions but, unlike in approach 1 above, these other interventions would be the same across the 6 options.
This latter aapproach (2) is the approach we have been using for several years. Running both approaches 1 and 2 will help us ascertain whether approach 1
has potential to replace approach 2 in future.
NOTES / CONSIDERATIONS / ISSUES
- prep: is > 80% adh enough for max efficacy ?
- check that suppressed viral load levels are low enough - % with vl < 1000 looks fine but check % with vl < 50 / 500 also looks ok
- no change in efficacy with m184v in partner ?
lower rate transmission m184v (and/or lower persistence) ?
- note that the scale factor to scale up to a population of 10 million (say) will differ according to inc_cat
- perhaps need to scale up per run according to t_alive1565
- abort early based on plausible gender-specific prevalence
- infected_prep applies for starting prep when in primary, but not when starting prep due to test sensitivity
- take account of fact that in namsal it took longer than 1 year for people with > 1 million VL at baseline to decline to < 50
(but less time to decline to < 1000) - regardless of regimen - not sure that adding this will add anything but keep considering
- could add in possibility of greater rate of initiation of art in hiv+ people who are diagnosed but off art (pop_wide_tld) due to easier access
but will leave out for now to err on side of being conservative about the strategy
- for country calibrations will calibrate to past trend in pop size and hiv prevalence and then current values of the wide range of measures
- add sw modelling to this and run sex worker interventions at same time ? (include fsw interventions so this can show generalisability of sex worker
modelling done in zim context) - or is it better to stick to country specific models for that ?
- can use this exact multiple enhancements program in the context of specific country contexts
- when these runs are done can add new intervetnions to evaluate - but need to add only one new intervention at a time and add it to the overall
number of runs - if try to add more than one change at the time time we lose the independent sampling of parameters
- what about the fact that the enhancements are a mixture of introducing new strategies and somehow enhancing the extent or effectiveness
of interventions already in place - I think OK so long as all sampling of enhancements is independent
- considered that some interventions can be time limited (esp hiv testing increases) - but decided to keep as is because may be problematic
to assume a derease again in x years
- conceive of an additional average annual cost per hiv diagnosed person (without sv = 1) to help to improve all below:
incr_adh_2020 decr_hard_reach_2020 decr_prob_loss_at_diag_2020 decr_rate_lost_2020 decr_rate_lost_art_2020
incr_rate_return_2020 incr_rate_return_2020 incr_rate_restart_2020 incr_rate_init_2020 decr_rate_int_choice_2020
- consider higher pr_art_init if diagnosed while on prep
- proposed options: (i) no improvements (ii) improvements (incl cascade of care, prep, circumcision, condoms, tld in all on art (can sample from each of the 4
alternatives below), alternative monitoring strategies of tld art initiators, tld for all men (except if tested �ve and np=0, start tld if np goes >= 1)
sample these)
- is it plausible that so people have very low adherence to prep and dont re-test within the 3 month period before re-starting (assume they will be
instructed to take PrEP every day and if they have a break of x days they need to test again) ?
- how will progress if want to do a new project on kzn ? add back in demographics and c_score code from kzn
- keep leigh and gesine involved
- at some point model effect of sti testing on sti ?
- for future consideration: how can prep programs for agyw in KZN assess if they are cost effective ? consider:
a. proportion of (re-)starters testing +ve within 3 months (the higher, the more cost effective) b. proportion of people on prep > 3 months testing
+ve per 3 months (the lower, the more cost effective) vary adherence, propensity to want to take, elig criteria (fsw only, >= 1 newp, >=2 newp,
>= 3 newp), incidence in 2017 (which varies anyway), efficacy, predict ce from a, b, cost prep/visits (or will they be equal across KZN ?)
(this applies assing rdt for the first test - proportion of (re-)starters testing +ve within 3 months will vary with window period of first test)
explore metrics for how to monitor prep programmes
- review gender differences in HIV prevalence and proportion diagnosed - larger differences seen in PHIA data
* === LOVELEEN NOTES
* === ANDREW NOTES
to do before starting testing in preparation for runs:
- consider effect of sw_program_visit on prob of starting and continuing on prep in sw
- add in exposure at birth (mother infected), mother vl, child prophylaxis, infection at birth based on mtct rate and at least risk of aids death,
resistance, diagnosed, onart, up to age 15 (would need to create a variable for each pregnancy for hiv+ women as to whether has transmitted to
the child, which can happen up to end of breastfeeding) - this would be based on woman-specific probabilities while the risk of babies being
infected would depend on the distribution of uch probabilities across all pregnant women in the period. probably will have to stick with having
pregnant = 1 only in one period for the period of childbirth (and not counting still births or miscarriages) but can include probabilities
of infection during breastfeeding based on dn of breastfeeding and viral load during the breastfeeding period.
- model ipt ?
- make parameters like rare_int_choice so that they vary between individuals ?
- todo: add in the variables to take medians of (cd4diag measured_cd4art years_since_start_prep n_test_prev_4p_onprep age_deb_sw act_years_sw tot_dur_sw)
- consider effects on transmission of increases in gx
- consider again early mismatch in newp by gender, and also growing newp_ge1 / newp_ge5 in first years to 1995: considered acceptable so long as resolved
by around 1995. We could have a burn in period for newp before hiv introduced in 1989 but wonder if it is worth the disruption when everything seems
generally OK
- re-visit costs (particularly of testing)
- sample rate of leaving sex work
- vmmc needs to depend on age
- conceive of an additional average annual cost per hiv diagnosed person (without sv = 1) to help to improve all below:
incr_adh_2020 decr_hard_reach_2020 decr_prob_loss_at_diag_2020 decr_rate_lost_2020 decr_rate_lost_art_2020
incr_rate_return_2020 incr_rate_return_2020 incr_rate_restart_2020 incr_rate_init_2020 decr_rate_int_choice_2020
- consider extra costs testing sw - currently sw_test_6mthly_2020 intervention is assumed to cost only the cost of the extra tests
- more generally, have included an annual cost for people with diagnosed hiv and sv ne 1 to improve cascade but have not included additional costs beyond
unit costs for increased switch of increased viral load measure done, prep or circumcision - still no specific costs for lower newp / more condom use
- consider that cascade of care enhancements can be general or in sex workers only
* ==== VALE NOTES
* ==== DOCUMENTATION NOTES AND IDEAS
- new outputs: AIDS death rate by CD4 at start of ART and ahd{t} in first period
***testing merge;
* ==== GENERAL NOTES AND CONSIDERATIONS
;
* libname a 'C:\Users\Toshiba\Documents\My SAS Files\outcome model\unified program\';
* libname a '/home/cceapsc/Scratch/';
%let outputdir = %scan(&sysparm,1," ");
libname a "&outputdir/";
%let tmpfilename = %scan(&sysparm,2," ");
* proc printto log="C:\Loveleen\Synthesis model\unified_log";
proc printto ; * log="C:\Users\Toshiba\Documents\My SAS Files\outcome model\unified program\log";
%let population = 1000;
options ps=1000 ls=220 cpucount=4 spool fullstimer ;
* creating a file cum_l1 that will be used to save outputs at the end of running each loop of the model , i.e. every 3 months ;
data cum_l1;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* SECTION 1
One row of data defined, containing parameter values that remain fixed for the whole run
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
data z;
run = rand('uniform')*1000000000; run=round(run,1);
dataset_id=trim(left(run));
call symput('dataset_id',dataset_id);
caldate1=1989;
caldate_never_dot=1989;
* these used after 2020 - code is here so value the same for all people;
_u1 = uniform(0); _u2 = uniform(0); _u3 = uniform(0); _u4 = uniform(0); _u5 = uniform(0); _u6 = uniform(0); _u7 = uniform(0); _u8 = uniform(0);
_u9 = uniform(0); _u10 = uniform(0); _u11 = uniform(0); _u12 = uniform(0); _u13 = uniform(0); _u14 = uniform(0); _u15 = uniform(0); _u16 = uniform(0);
_u17 = uniform(0); _u18 = uniform(0); _u19 = uniform(0); _u20 = uniform(0); _u21 = uniform(0); _u22 = uniform(0); _u23 = uniform(0); _u24 = uniform(0);
_u25 = uniform(0); _u26 = uniform(0); _u27 = uniform(0); _u28 = uniform(0); _u29 = uniform(0); _u30 = uniform(0); _u31 = uniform(0); _u32 = uniform(0);
_u33 = uniform(0); _u34 = uniform(0); _u35 = uniform(0); _u36 = uniform(0); _u37 = uniform(0); _u38 = uniform(0); _u39 = uniform(0); _u40 = uniform(0);
_u41 = uniform(0); _u42 = uniform(0); _u43 = uniform(0); _u44 = uniform(0); _u45 = uniform(0); _u46 = uniform(0); _u47 = uniform(0); _u48 = uniform(0);
_u49 = uniform(0); _u50 = uniform(0); _u51 = uniform(0); _u52 = uniform(0); _u53 = uniform(0); _u54 = uniform(0); _u55 = uniform(0); _u56 = uniform(0);
_u57 = uniform(0); _u58 = uniform(0); _u59 = uniform(0); _u60 = uniform(0); _u61 = uniform(0); _u62 = uniform(0); _u63 = uniform(0); _u64 = uniform(0);
* start of epidemic;
startyr = 1989 + 0.25;
* ts1m;
/*
startyr = 1989 + 1/12;
*/
newp_seed = 7;
* PARAMETER VALUES - NOTE THESE ALL GET OVER_WRITTEN BELOW IF SAMPLED;
* SEXUAL BEHAVIOUR;
ch_risk_diag = 9/13; *overwritten;
ch_risk_diag_newp = 5/6; *overwritten;
ych_risk_beh_newp = .99; *overwritten;
ych2_risk_beh_newp = 1.0; *overwritten;
ych_risk_beh_ep = 1.0; *overwritten;
eprate=0.1; *overwritten; * dependent_on_time_step_length ;
newp_factor= 6.5; *overwritten;
p_rred_p = 0.20; *overwritten;
p_hsb_p = 0.05; *overwritten;
condom_incr_2020 = 0; * mar19;
exp_setting_lower_p_vl1000 = 0; * exposure to hiv in an external setting where p_vl1000 is lower - during short term out migration followed by return;
external_exp_factor = 1;
rate_exp_set_lower_p_vl1000 = 0; * dependent_on_time_step_length ;
rr_sw_age_1519 = 1.00;
rr_sw_age_2534 = 0.30;
rr_sw_age_3549 = 0.03;
rr_sw_life_sex_risk_3 = 10;
rr_sw_prev_sw = 10;
* PREGNANCY;
can_be_pregnant=0.95;
prob_pregnancy_base=0.08; *overwritten; * dependent_on_time_step_length ;
fold_preg1524=2;
fold_preg2534=1.9;
fold_preg4554=0.2;
fold_preg5564=0.0;
* TRANSMISSION;
fold_tr= 1.0; *overwritten;
tr_rate_primary = 0.16;
tr_rate_undetec_vl = 0.001;
fold_change_w = 1.5; *overwritten;
fold_change_yw = 2; *overwritten;
fold_change_sti = 3; *overwritten;
fold_tr_newp = 0.3;
super_infection = 0; *overwritten;
res_trans_factor_nn = 0.60 ; *overwritten - factor determining extent to which some NN transmitted resistance immediately reverts and is effectively lost;
res_trans_factor_ii = 1; *overwritten;
rate_loss_persistence = 0.04; *overwritten - loss of persistence of tdr - at the moment rate same for each mutation, but rate transmission not same for each mutation;
* dependent_on_time_step_length ;
* AP 19-7-19 ;
rate_loss_nnres_pmtct_maj = 0.75; rate_loss_nnres_pmtct_min = rate_loss_nnres_pmtct_maj; * apr 2019 - increased from 0.25 due as part of
reconciling model with higher proportion of men with viral suppression on art than women, when data are the opposite;
* dependent_on_time_step_length ;
* HIV TESTING ;
date_start_testing = 2003.5;
date_start_testanc=2003.5;
initial_rate_1sttest = 0; * dependent_on_time_step_length ;
test_rate_who4=0.10; * dependent_on_time_step_length ;
test_rate_tb =0.10; * dependent_on_time_step_length ;
test_rate_who3=0.05; * dependent_on_time_step_length ;
rate_testanc_inc=0.0040; *overwritten - malawi aug15 - rate_testanc_inc_a2015=an_lin_incr_test;
hivtest_type=3; *Jul2016 - HIV test type and sensitivity of test;
date_pmtct=2004;
pmtct_inc_rate = 0.20; * rate_per_year ;
np_lasttest=0;
newp_lasttest=0;
test_targeting = 1; *overwritten - test_targeting;
max_freq_testing=1; *overwritten - means cant test more than annually;
incr_test_2020 = 0;
sw_test_6mthly=0;
* CIRCUMCISION;
circ_inc_rate = 0.003; *overwritten; * dependent_on_time_step_length ;
mc_int=2008;
test_link_circ=1;
test_link_circ_prob = 0.05;
* NATURAL PROGRESSION;
mean_sqrtcd4_inf=27.5 ; * mean sqrt CD4 at infection;
fx = 1.0; *overwritten - factor determining rate of natural cd4 decline;
gx=1.0;
fold_incr_who3 = 5;
fold_decr_hivdeath=0.25; * degree to which hiv death rate is lower than aids rate;
fold_change_in_risk_base_rate = 1;
incr_death_rate_adc = 10;
incr_death_rate_tb = 10;
fold_change_ac_death_rate = 1;
* LINKAGE, RETENTION, MONITORING, LOSS, RETURN, INTERRUPTION OF ART AND RESTARTING, ART;
prob_loss_at_diag = 0.4; *overwritten;
prob_lossdiag_adctb = 0.05; *overwritten;
prob_lossdiag_who3e = 0.15; *overwritten;
art_monitoring_strategy = 8;
rate_lost = 0.04; *overwritten; * dependent_on_time_step_length ;
prob_lost_art = 0.9; *overwritten;
rate_return = 0.05; *overwritten; * dependent_on_time_step_length ;
rate_restart = 0.4; *overwritten; * dependent_on_time_step_length ;
pr_art_init = 0.4; *overwritten; * dependent_on_time_step_length ;
base_res_test=0;
flr=0;
third_line=1; * this means third line with dar unavailable but it is possible to have 1st line efa, 2nd line dol, 3rd line taz or lpr;
art_intro_date = 2004;
fold_change_mut_risk = 1; *overwritten;
v_min_art=1.0;
sd_v_art=0.5;
pr_switch_line = 0.05; *overwritten; * dependent_on_time_step_length ;
adh_pattern = 2; *overwritten;
red_adh_tb_adc = 0.1; *overwritten - reduced adherence in those with TB disease or active WHO4;
red_adh_tox_pop = 0.05; *overwritten - reduced adherence in those with toxicity;
add_eff_adh_nnrti = 0.10; *overwritten - additional "effective" adh of nnrti due to longer half life;
altered_adh_sec_line_pop = 0.05; *overwritten - better adherence on second line (pi);
adh_effect_of_meas_alert = 0.7; *overwritten;
pir_higher_potency=1;
adh_nnrti_p5_if_ltp5 = 1;
poorer_cd4rise_fail_nn = -6; *overwritten - adjustment to degree of cd4 change for being on nnrti not pi when nactive <= 2 ;
* dependent_on_time_step_length ;
sd_cd4 = 1.2;* sd of cd4 (on sqrt scale);
sd_measured_cd4 = 1.7; * error added to measured cd4 (on sqrt scale);
rate_int_choice = 0.01; *overwritten; * dependent_on_time_step_length ;
prob_supply_interrupted=0.003; * drug supply; * dependent_on_time_step_length ;
prob_supply_resumed=0.8; * per 3 mths - base 0.8; * dependent_on_time_step_length ;
rate_loss_acq_nnm_offart = 0.05; * informed by consideration of data on proportion of people ART experienced re-initiators with nnrti resistance in padr program;
* dependent_on_time_step_length ;
prob_nnresmaj_sd_nvp=0.35;
prob_nnresmaj_dual_nvp=0.045; *In SA guidelines in 2010: AZT from 14 weeks, sdNVP + AZT 3hrly during labour, TDF + FTC single dose (stat) after delivery,
Arrive 2007, meta-analysis, prevalence of nnres 4-8 weeks post partum ( single dose nevirapine+additional post-partum) 0.045,
22% had resistance mutation to AZT (8% considering prop>20%), 18% to NVP (4% considering prop>5%) ;
fold_change_tams_risk=1; * fold change tams risk;
fold_change_151_risk=1; * fold change in 151 risk (high enough rate of development of cross-class nuc resistance ?);
add_cd4_loss_nactive_low = 0; * additional cd4 loss if nactive <= 1;
is_red_activity=0; * extent to which number of active drugs is under or over-estimated by interpretation systems;
sd_patient_cd4_rise_art= 0.2; * inter-patient variation in rate of CD4 rise - when CD4 is rising;
clinic_not_aw_int_frac=0.6; *overwritten - fraction of people who are visiting clinic who have interrupted art in whom clinic is not aware (and hence wrongly called virologic failure);
prob_cd4_meas_done=0.85; * consider whether effectively * dependent_on_time_step_length ;
prob_vl_meas_done=0.50; *overwritten; * consider whether effectively * dependent_on_time_step_length ;
prob_who3_diagnosed=0.50;
prob_who4_diagnosed=0.80;
incr_rate_int_low_adh = 1; *overwritten;
prob_return_adc = 0.8; *overwritten;
res_test_6m_if_vlg1000=0;
sd_vl_whb=0.50; * whb relates to whole blood for viral load sample - as used in dbs;
decr_sd_vl_whb=0.05; * whb relates to whole blood for viral load sample - as used in dbs;
vl_whb_offset= 0.0; * whb relates to whole blood for viral load sample - as used in dbs;
sv_secondline = 1;
switch_for_tox = 0; *overwritten;
higher_newp_less_engagement = 0; *overwritten - are people with more newp less likely to be engaged with care;
* AP 19-7-19 ;
ntd_risk_dol = 0.0022; * todo - update this when tsepamo results updated ;
dol_higher_potency = 1.5;
* AP 19-7-19 ;
rel_dol_tox = 1; *overwritten;
zero_3tc_activity_m184 = 0; *overwritten;
zero_tdf_activity_k65r = 0; *overwritten;
hard_reach=0; * this is effectively reluctance to test - with effects on testing for prep and vmmc also - assumed will test if symptomatic or in anc;
* PREP;
* PREP assumed introduced in fsw/agyw 2017 - with level of coverage and retention;
annual_testing_prep=0.25; *frequency of HIV testing for people on PrEP (1=annual, 0.5= every 6 months, 0.25=every 3 months);
hivtest_type=3; *HIV test type (1=RNA VL test, 3=3rd gen, 4=4th gen);
eff_adh_prep=0.95; *PrEP effectiveness with 100% adherence ;
factor_prep_adh_older=0.5; * factor determining how much higher adh to prep is in people age > 25 than < 25;
rate_test_onprep=1.00; *Rate of being tested for HIV whilst on PrEP; * may17 #### was 0.95 - changed to remove effect of this on number on prep (this will need to be considered again) ;
* dependent_on_time_step_length ;
pr_prep_b=0.75; * 11dec17; *Probability of starting PrEP in people (who are eligible and willing to tak prep) tested for HIV according to the base rate of testing;
prob_prep_restart=1.00; * set to 1 given we have rate_test_restartprep; *Probability of restarting PrEP after discontinuation due to not eligible; * may17;
* dependent_on_time_step_length ;
prob_prep_visit_counsel=0; *Probability of PrEP adherence counselling happening at drug pick-up;
tot_yrs_prep=0;
prob_prep_restart_choice=0.10; * probability of restarting PrEP after discontinuation even when newp>1;
* dependent_on_time_step_length ;
prepuptake_sw=0.50; *Probability of PrEP uptake if eligible for female sex workers;
prepuptake_pop=0.20; **Probability of PrEP uptake if eligible for general population;
pop_wide_tld_prob_egfr=0.5; * probability per 3 months of getting egfr test when pop_wide_tld_prep=1 when indicated (annually);
* dependent_on_time_step_length ;
* EXTRA RATE PARAMETERS FOR WHICH VALUES WERE PREVIOUSLY HARD CODED BELOW - 26_11_19;
* rate of change in art initiation strategy in 2011;
rate_ch_art_init_str_2011 = 0.4;
* rate of women wanting no more children;
rate_want_no_more_children = 0.005;
* rate of sti and persistence, function of newp;
rate_sti = 1 / 20 ;
rate_persist_sti = 1 / 5 ;
* dependent on rred_rc, rate of sex workers moving to one category lower;
rate_sw_rred_rc = 0.02;
* rate of development of non-hiv symptoms, regardless of hiv status;
rate_non_hiv_symptoms=0.005;
r_swi_efa_cns = 0.02;
r_swi_efa_ras = 0.05;
r_swi_nev_hep = 0.10;
r_swi_nev_ras = 0.15;
r_swi_zdv_nau = 0.08;
r_swi_zdv_head = 0.02;
r_swi_zdv_lip = 0.01;
r_swi_zdv_ane = 0.05;
r_swi_zdv_lac = 1;
r_swi_ten_neph = 0.20;
r_swi_lpr_nau = 0.05;
r_swi_lpr_dia = 0.05;
r_swi_taz_nau = 0.05;
r_swi_taz_dia = 0.05;
r_swi_dol_cns = 0.02;
rate_loss_acq_pim_offart = 0.2;
rate_loss_acq_iim_offart = 0.2;
r_nau_start_zdv_lpr = 0.03 ;
p_nau_stops_zdv_lpr = 0.5 ;
r_dia_start_lpr = 0.02;
p_dia_stops_lpr = 0.5 ;
r_dia_start_taz_dar = 0.01;
p_dia_stops_taz_dar = 0.5 ;
r_ras_start_efa = 0.03;
r_res_start_nev = 0.10;
r_weightg_start_dol = 0.01;
r_cns_start_efa = 0.1;
p_cns_stops_efa = 0.2;
r_cns_start_dol = 0.05;
p_cns_stops_dol = 0.6;
r_lip_start_zdv = 0.015;
r_hep_start_nev = 0.02;
r_otx_start = 0.03;
r_ane_start_zdv = 0.03;
p_ane_stops_zdv = 0.8;
r_head_start_zdv = 0.1;
p_head_stops_zdv = 0.6 ;
r_lac_start_zdv = 0.0002;
r_neph_start_ten = 0.0035;
p_neph_stops_ten = 0 ;
p_neph_stops_after_ten = 0.1;
* ========== PARAMETER VALUES SAMPLED ; * these represent both uncertainty over likely fixed biological parameters and variability over settings;
***** population growth ***LBM Jul19;
* inc_cat; r=uniform(0); if r < 0.33 then inc_cat = 1; if 0.33 <= r < 0.66 then inc_cat = 2; if 0.66 <= r then inc_cat=3;
***** Sexual behaviour;
* base_rate_sw; r=uniform(0); if r < 0.20 then base_rate_sw = 0.0015; if 0.20 <= r < 0.8 then base_rate_sw = 0.002 ;
if 0.80 <= r then base_rate_sw = 0.0025 ;
* dependent_on_time_step_length ;
* base_rate_stop_sexwork; r=uniform(0); base_rate_stop_sexwork = 0.03; if r < 0.33 then base_rate_stop_sexwork = 0.015;
if r > 0.67 then base_rate_stop_sexwork = 0.01;
* dependent_on_time_step_length ;
* sw_trans_matrix; r=uniform(0); if r < 0.125 then sw_trans_matrix = 1; if 0.125 <= r < 0.250 then sw_trans_matrix = 2;
if 0.250 <= r < 0.375 then sw_trans_matrix = 3; if 0.375 <= r < 0.500 then sw_trans_matrix = 4;
if 0.500 <= r < 0.625 then sw_trans_matrix = 5; if 0.625 <= r < 0.750 then sw_trans_matrix = 6;
if 0.750 <= r < 0.875 then sw_trans_matrix = 7; if 0.875 <= r then sw_trans_matrix = 8;
* sw_init_newp; r=uniform(0); if r < 0.50 then sw_init_newp = 1; if 0.50 <= r then sw_init_newp = 2;
if 1.00 <= r then sw_init_newp = 3; *nobody in this category for now;
* rate_sw_rred_rc; r=uniform(0); if r < 0.33 then rate_sw_rred_rc=0.01; if 0.33 <= r < 0.67 then rate_sw_rred_rc = 0.03;
if 0.67 <= r then rate_sw_rred_rc = 0.10; * dependent on rred_rc, rate of sex workers moving to one category lower;
* sex_beh_trans_matrix_m and sex_beh_trans_matrix_w ;
e=uniform(0);
if e < 1/15 then sex_beh_trans_matrix_m=1;if 1/15 <= e < 2/15 then sex_beh_trans_matrix_m=2;if 2/15 <= e < 3/15 then sex_beh_trans_matrix_m=3;
if 3/15 <= e < 4/15 then sex_beh_trans_matrix_m=4;if 4/15 <= e < 5/15 then sex_beh_trans_matrix_m=5;if 5/15 <= e < 6/15 then sex_beh_trans_matrix_m=6;
if 6/15 <= e < 7/15 then sex_beh_trans_matrix_m=7;if 7/15 <= e < 8/15 then sex_beh_trans_matrix_m=8;if 8/15 <= e < 9/15 then sex_beh_trans_matrix_m=9;
if 9/15 <= e < 10/15 then sex_beh_trans_matrix_m=10; if 10/15 <= e < 11/15 then sex_beh_trans_matrix_m=11;if 11/15 <= e < 12/15 then sex_beh_trans_matrix_m=12;
if 12/15 <= e < 13/15 then sex_beh_trans_matrix_m=13; if 13/15 <= e < 14/15 then sex_beh_trans_matrix_m=14;if 14/15 <= e < 15/15 then sex_beh_trans_matrix_m=15;
e=uniform(0);
if e < 1/15 then sex_beh_trans_matrix_w=1;if 1/15 <= e < 2/15 then sex_beh_trans_matrix_w=2;if 2/15 <= e < 3/15 then sex_beh_trans_matrix_w=3;
if 3/15 <= e < 4/15 then sex_beh_trans_matrix_w=4;if 4/15 <= e < 5/15 then sex_beh_trans_matrix_w=5;if 5/15 <= e < 6/15 then sex_beh_trans_matrix_w=6;
if 6/15 <= e < 7/15 then sex_beh_trans_matrix_w=7;if 7/15 <= e < 8/15 then sex_beh_trans_matrix_w=8;if 8/15 <= e < 9/15 then sex_beh_trans_matrix_w=9;
if 9/15 <= e < 10/15 then sex_beh_trans_matrix_w=10; if 10/15 <= e < 11/15 then sex_beh_trans_matrix_w=11;if 11/15 <= e < 12/15 then sex_beh_trans_matrix_w=12;
if 12/15 <= e < 13/15 then sex_beh_trans_matrix_w=13; if 13/15 <= e < 14/15 then sex_beh_trans_matrix_w=14;if 14/15 <= e < 15/15 then sex_beh_trans_matrix_w=15;
* sex_age_mixing_matrix_m;e=uniform(0); if e < 1/6 then sex_age_mixing_matrix_m=1; if 1/6 <= e < 2/6 then sex_age_mixing_matrix_m=2;
if 2/6 <= e < 3/6 then sex_age_mixing_matrix_m=3; if 3/6 <= e < 4/6 then sex_age_mixing_matrix_m=4;
if 4/6 <= e < 5/6 then sex_age_mixing_matrix_m=5; if 5/6 <= e then sex_age_mixing_matrix_m=6;
* sex_age_mixing_matrix_w;e=uniform(0); if e < 1/6 then sex_age_mixing_matrix_w=1; if 1/6 <= e < 2/6 then sex_age_mixing_matrix_w=2;
if 2/6 <= e < 3/6 then sex_age_mixing_matrix_w=3; if 3/6 <= e < 4/6 then sex_age_mixing_matrix_w=4;
if 4/6 <= e < 5/6 then sex_age_mixing_matrix_w=5; if 5/6 <= e then sex_age_mixing_matrix_w=6;
* rred_a_p; r=uniform(0); if r < 0.15 then rred_a_p=1; if 0.15 <= r < 0.30 then rred_a_p=2; if 0.30 <= r < 0.65 then rred_a_p=3; if r >= 0.65 then rred_a_p=4;
* p_rred_p; r=uniform(0); if r < 0.33 then p_rred_p = 0.3; if 0.33 <= r < 0.67 then p_rred_p = 0.5;
if 0.67 <= r then p_rred_p = 0.7;
* p_hsb_p; r=uniform(0); if r < 0.33 then p_hsb_p = 0.05; if 0.33 <= r < 0.67 then p_hsb_p = 0.08; if 0.67 <= r then p_hsb_p = 0.15;
* newp_factor; newp_factor = 1 ; * 15_1_20 4pm ;
r=uniform(0); if r < 0.33 then newp_factor = 0.5 ; if r > 0.67 then newp_factor = 2 ;
* eprate; eprate = 0.1* exp(normal(0)*0.25); eprate = round(eprate,0.01);* rate of new long term partners in youngest age group;
* dependent_on_time_step_length ;
* conc_ep; r=uniform(0); conc_ep = 1 ; if r < 0.33 then conc_ep = 0.333; if r > 0.67 then conc_ep=3;
* ch_risk_diag; r=uniform(0); if r < 0.25 then ch_risk_diag = 0.7; if 0.25 <= r < 0.5 then ch_risk_diag = 0.8; if 0.5 <= r < 0.75 then ch_risk_diag = 0.9; if 0.8 <= r then ch_risk_diag = 1;
* ch_risk_diag_newp; r=uniform(0); if r < 0.25 then ch_risk_diag_newp = 0.7; if 0.25 <= r < 0.5 then ch_risk_diag_newp = 0.8; if 0.5 <= r < 0.75 then ch_risk_diag_newp = 0.9; if 0.75 <= r then ch_risk_diag_newp = 1; *mf - aug18;
* ych_risk_beh_newp; r=uniform(0); ych_risk_beh_newp = 0.70; if r < 0.20 then ych_risk_beh_newp = 0.80; if 0.80 <= r then ych_risk_beh_newp = 0.60;
* ych2_risk_beh_newp; r=uniform(0); if r < 0.05 then ych2_risk_beh_newp = 1/0.95; if 0.05 <= r < 0.1 then ych2_risk_beh_newp = 1/0.99; if 0.1 <= r < 0.9 then ych2_risk_beh_newp = 1.0; if 0.9 <= r < 0.95 then ych2_risk_beh_newp = 0.99; if 0.95 <= r then ych2_risk_beh_newp = 0.95;
* ych_risk_beh_ep; r=uniform(0); ych_risk_beh_ep = 1.00; if 0.25 <= r < 0.5 then ych_risk_beh_ep = 0.95; if 0.5 <= r < 0.75 then ych_risk_beh_ep = 0.90; if 0.75 <= r then ych_risk_beh_ep = 0.80;
* exp_setting_lower_p_vl1000; exp_setting_lower_p_vl1000 = 0; * exposure to setting with lower p_vl1000 due to migration (and return);
r=uniform(0); if r < 0.20 then do;
exp_setting_lower_p_vl1000 = 1; * whether in this model run exposure can happen;
external_exp_factor = 1 + uniform(0); external_exp_factor = round(external_exp_factor,0.01); * effect of exposure ;
rate_exp_set_lower_p_vl1000 = uniform(0) * 0.01 ; rate_exp_set_lower_p_vl1000 = round(rate_exp_set_lower_p_vl1000,0.0001);
* rate of exposure; * rate_exp_set_lower_p_vl1000 * dependent_on_time_step_length ;
end;
* higher_newp_with_lower_adhav;
r=uniform(0); higher_newp_with_lower_adhav = 0; if r < 0.2 then higher_newp_with_lower_adhav = 1;
***** pregnancy;
* prob_pregnancy_base; r=uniform(0); prob_pregnancy_base=0.03 + r*0.08;
if inc_cat = 1 then prob_pregnancy_base = prob_pregnancy_base * 1.75 ;if inc_cat = 3 then prob_pregnancy_base = prob_pregnancy_base / 1.75 ;
prob_pregnancy_base = round(prob_pregnancy_base,0.001); * dependent_on_time_step_length ;
***** transmission;
* fold_change_w; r=uniform(0); if r < 0.05 then fold_change_w = 1; if 0.05 <= r < 0.30 then fold_change_w = 1.5;
if 0.30 <= r then fold_change_w = 2;
* fold_change_yw; fold_change_yw = fold_change_w * 3 ; r=uniform(0); if r < 0.33 then fold_change_yw = fold_change_w * 1 ;
if r > 0.67 then fold_change_yw = fold_change_w * 5 ;
* fold_change_sti; fold_change_sti=3 ; r=uniform(0); if r < 0.333 then fold_change_sti=2 ; if r > 0.67 then fold_change_sti=5 ;
* fold_tr_newp; fold_tr_newp = 0.3; r=uniform(0); if r < 0.33 then fold_tr_newp = 0.5; if r > 0.67 then fold_tr_newp = 0.7;
* super_infection; u=uniform(0); if u < 0.5 then super_infection=0; if u >= 0.5 then super_infection = 1;
***** testing;
* an_lin_incr_test; r=uniform(0); if r < 0.1 then an_lin_incr_test = 0.0005 ; if 0.1 <= r < 0.3 then an_lin_incr_test = 0.0030;
if 0.3 <= r < 0.5 then an_lin_incr_test = 0.0100 ; if 0.5 <= r < 0.7 then an_lin_incr_test = 0.0200;
if 0.7 <= r < 0.9 then an_lin_incr_test = 0.0400;
if 0.9 <= r then an_lin_incr_test = 0.1000;
* date_test_rate_plateau; r=uniform(0); if r < 0.1 then date_test_rate_plateau = 2011.5; if 0.1 <= r < 0.2 then date_test_rate_plateau = 2013.5;
if 0.2 <= r < 0.4 then date_test_rate_plateau = 2015.5; if 0.4 <= r < 0.7 then date_test_rate_plateau = 2017.5;
if 0.7 <= r then date_test_rate_plateau = 2019.5;
* rate_testanc_inc; r=uniform(0); if r < 0.33 then rate_testanc_inc = 0.030; if 0.33 <= r < 0.66 then rate_testanc_inc = 0.050; if 0.66 <= r then rate_testanc_inc = 0.1; * jul18;
* dependent_on_time_step_length ;
* incr_test_rate_sympt; r=uniform(0); if r < 0.2 then incr_test_rate_sympt = 1.05 ; if 0.2 <= r < 0.4 then incr_test_rate_sympt = 1.10; if 0.4 <= r < 0.6 then incr_test_rate_sympt = 1.15; if 0.6 <= r < 0.8 then incr_test_rate_sympt = 1.20; if 0.8 <= r then incr_test_rate_sympt = 1.25;
* dependent_on_time_step_length ;
* max_freq_testing; r=uniform(0); max_freq_testing =1; if r < 0.20 then max_freq_testing=2;
* test_targeting; r=uniform(0); test_targeting =1.25 ; if r < 0.20 then test_targeting = 1.5;
***** natural progression;
* fx; r=uniform(0); if r < 0.2 then fx = 0.7; if 0.2 <= r < 0.4 then fx = 0.85; if 0.4 <= r < 0.6 then fx = 1.0; if 0.6 <= r < 0.8 then fx = 1/0.85 ; if 0.8 <= r then fx=1/0.7;
* gx; r=uniform(0); if r < 0.33 then gx = 1.0; if 0.33 <= r < 0.67 then gx = 1.5; if 0.67 <= r then gx = 2.0;
***** art: linkage, retention, monitoring, loss, return, interruption of art and restarting;
* adh_pattern; r=uniform(0);
if 0.00 <= r < 0.05 then adh_pattern=100 ; if 0.05 <= r < 0.70 then adh_pattern=1; if 0.70 <= r < 0.80 then adh_pattern=2;
if 0.80 <= r < 0.90 then adh_pattern=3; if 0.90 <= r < 0.95 then adh_pattern=4; if 0.95 <= r then adh_pattern=5;
* AP 19-7-19 - most of these changes to parameters sampled are from trying to get a range of setting scenarios that reflect sub saharan africa;
* reduced higher values as middle 90 not consistent with phias with those values ;
* prob_loss_at_diag; r=uniform(0); if r < 0.20 then prob_loss_at_diag = 0.02; if 0.20 <= r < 0.40 then prob_loss_at_diag = 0.05;
if 0.40 <= r < 0.60 then prob_loss_at_diag = 0.20; if 0.60 <= r < 0.80 then prob_loss_at_diag = 0.35;
if 0.80 <= r < 0.90 then prob_loss_at_diag = 0.50; if 0.90 <= r then prob_loss_at_diag = 0.80;
* AP 19-7-19 ;
* pr_art_init; r=uniform(0); if 0 <= r < 0.25 then pr_art_init = 0.4; if 0.25 <= r < 0.50 then pr_art_init = 0.5; if 0.5 <= r < 0.75 then pr_art_init = 0.6; if 0.75 <= r then pr_art_init = 0.7;
* dependent_on_time_step_length ;
* rate_lost; r=uniform(0); if r < 0.33 then rate_lost = 0.2; if 0.33 <= r < 0.66 then rate_lost = 0.35; if r >= 0.66 then rate_lost = 0.5;
* dependent_on_time_step_length ;
* prob_lost_art; r=uniform(0); if r < 0.2 then prob_lost_art = 0.5; if 0.2 <= r < 0.4 then prob_lost_art = 0.6; if 0.4 <= r < 0.6 then prob_lost_art = 0.7; if 0.6 <= r < 0.8 then prob_lost_art = 0.8; if 0.8 <= r then prob_lost_art = 0.9;
* dependent_on_time_step_length ;
* AP 19-7-19 ;
* rate_return; r=uniform(0); if r < 0.10 then rate_return = 0.01; if 0.10 <= r < 0.25 then rate_return = 0.10;
if 0.25 <= r < 0.5 then rate_return = 0.10; if 0.5 <= r < 0.75 then rate_return = 0.50 ; if 0.75 <= r then rate_return = 0.8;
* rate_restart; r=uniform(0); if r < 0.25 then rate_restart = 0.8; if 0.25 <= r < 0.5 then rate_restart = 0.85; if 0.5 <= r < 0.75 then rate_restart = 0.9; if 0.75 <= r then rate_restart = 0.95;
* dependent_on_time_step_length ;
* AP 19-7-19 ;
* rate_int_choice; r=uniform(0); if r < 0.25 then rate_int_choice = 0.0005; if 0.25 <= r < 0.50 then rate_int_choice = 0.002;
if 0.50 <= r < 0.75 then rate_int_choice = 0.004; if 0.75 <= r then rate_int_choice = 0.008 ;
* clinic_not_aw_int_frac; r=uniform(0); if r < 0.2 then clinic_not_aw_int_frac = 0.1; if 0.2 <= r < 0.4 then clinic_not_aw_int_frac = 0.3; if 0.4 <= r < 0.6 then clinic_not_aw_int_frac = 0.5; if 0.6 <= r < 0.8 then clinic_not_aw_int_frac = 0.7; if 0.8 <= r then clinic_not_aw_int_frac = 0.9;
* res_trans_factor_nn (this is for nnrti only); r=uniform(0); if r < 0.20 then res_trans_factor_nn= 0.50; if 0.20 <= r < 0.40 then res_trans_factor_nn= 0.7;
if 0.40 <= r < 0.60 then res_trans_factor_nn= 0.8; if 0.60 <= r < 0.80 then res_trans_factor_nn= 0.90; if 0.80 <= r then res_trans_factor_nn= 1.00; * may18;
* rate_loss_persistence; r=uniform(0); if r < 0.1 then rate_loss_persistence= 0.00;if 0.1 <= r < 0.2 then rate_loss_persistence= 0.005; if 0.2 <= r < 0.3 then rate_loss_persistence= 0.01; if 0.3 <= r < 0.7 then rate_loss_persistence= 0.015; if 0.7 <= r then rate_loss_persistence= 0.020;
* incr_rate_int_low_adh; r=uniform(0); incr_rate_int_low_adh = 1; if r < 0.5 then incr_rate_int_low_adh = 2; if r < 0.25 then incr_rate_int_low_adh = 5;
* poorer_cd4rise_fail_nn; poorer_cd4rise_fail_nn = -6 + (3 * normal(0)); poorer_cd4rise_fail_nn = round(poorer_cd4rise_fail_nn,1);
* poorer_cd4rise_fail_ii; r=uniform(0); poorer_cd4rise_fail_ii=0; if r < 0.5 then poorer_cd4rise_fail_ii=1;
* rate_res_ten; r=uniform(0); rate_res_ten=0.2; if r < 0.33 then rate_res_ten=0.1; if r >= 0.67 then rate_res_ten=0.3;
* fold_change_mut_risk; r=uniform(0); fold_change_mut_risk = 1; if r < 0.10 then fold_change_mut_risk = 2; if r > 0.90 then fold_change_mut_risk = 0.5; * jan18;
* adh_effect_of_meas_alert; r=uniform(0); adh_effect_of_meas_alert = 0.7; if 0.7 <= r < 0.85 then adh_effect_of_meas_alert = 0.35; if 0.85 <= r then adh_effect_of_meas_alert = 0.9;
* pr_switch_line; r=uniform(0); pr_switch_line = 0.20; if 0.75 <= r then pr_switch_line = 0.50;
* prob_vl_meas_done; r=uniform(0); prob_vl_meas_done=0.7 ; if 0.40 <= r < 0.70 then prob_vl_meas_done=0.1 ; if 0.70 <= r < 0.95 then prob_vl_meas_done=1.00; if 0.95 <= r then prob_vl_meas_done=0.00;
* cd4_monitoring; r=uniform(0); cd4_monitoring=0; if prob_vl_meas_done=0.0 and r < 0.5 then cd4_monitoring = 1;
* red_adh_tb_adc; red_adh_tb_adc = 0.1 * exp(normal(0)*0.5); red_adh_tb_adc=round(red_adh_tb_adc,.01);
* red_adh_tox_pop; r=uniform(0); red_adh_tox_pop_v = 0.05; if r < 0.5 then red_adh_tox_pop_v = 0.10;
red_adh_tox_pop = red_adh_tox_pop_v * exp(normal(0)*0.5); red_adh_tox_pop=round(red_adh_tox_pop,.01);
* red_adh_multi_pill_pop; r=uniform(0); red_adh_multi_pill_pop_v = 0.05; if r < 0.33 then red_adh_multi_pill_pop_v = 0.10;
if r > 0.67 then red_adh_multi_pill_pop_v = 0.15;
red_adh_multi_pill_pop = red_adh_multi_pill_pop_v * exp(normal(0)*0.5);
red_adh_multi_pill_pop=round(red_adh_multi_pill_pop,.01);
* greater_disability_tox; r=uniform(0); greater_disability_tox = 0; if r < 0.5 then greater_disability_tox = 1;
* greater_tox_zdv; r = uniform(0); greater_tox_zdv = 0; if 0.33 <= r < 0.67 then greater_tox_zdv = 1;if 0.67 <= r then greater_tox_zdv = 2;
if greater_tox_zdv = 1 then do; r_nau_start_zdv_lpr = r_nau_start_zdv_lpr * 2 ; r_lip_start_zdv = r_lip_start_zdv* 2 ;
r_ane_start_zdv = r_ane_start_zdv* 2 ; r_head_start_zdv = r_head_start_zdv * 2 ; r_lac_start_zdv = r_lac_start_zdv* 2 ; end;
if greater_tox_zdv = 2 then do; r_nau_start_zdv_lpr = r_nau_start_zdv_lpr * 4 ; r_lip_start_zdv = r_lip_start_zdv* 4 ;
r_ane_start_zdv = r_ane_start_zdv* 4 ; r_head_start_zdv = r_head_start_zdv * 4 ; r_lac_start_zdv = r_lac_start_zdv* 4 ; end;
* add_eff_adh_nnrti; add_eff_adh_nnrti = 0.10* exp(normal(0)*0.30); add_eff_adh_nnrti=round(add_eff_adh_nnrti,.01);
* altered_adh_sec_line_pop; altered_adh_sec_line_pop = 0.05 +(normal(0)*0.05); altered_adh_sec_line_pop = round(altered_adh_sec_line_pop,.01);
* prob_return_adc; r=uniform(0); if r < 0.2 then prob_return_adc = 0.7; if 0.2 <= r < 0.5 then prob_return_adc = 0.8; if 0.5 <= r then prob_return_adc = 0.9;
* prob_lossdiag_adctb; prob_lossdiag_adctb = rand('beta',5,95); prob_lossdiag_adctb = round(prob_lossdiag_adctb,0.01);
* prob_lossdiag_who3e; prob_lossdiag_who3e = rand('beta',15,85);prob_lossdiag_who3e = round(prob_lossdiag_who3e,0.01);
* lower_future_art_cov; r=uniform(0); if 0 <= r < 0.97 then lower_future_art_cov=0;if 0.97 <= r then lower_future_art_cov=1;
* higher_future_prep_cov;r=uniform(0); if 0 <= r < 0.80 then higher_future_prep_cov=0;if 0.80 <= r then higher_future_prep_cov=1;
* higher_newp_less_engagement; r=uniform(0);higher_newp_less_engagement = 0; if r < 0.2 then higher_newp_less_engagement = 1; * are people with more newp less likely to be engaged with care;
* fold_tr; fold_tr= 1.0 ; r=uniform(0); if r < 0.33 then fold_tr = 0.67; if r > 0.67 then fold_tr = 1.5;
* switch_for_tox; r=uniform(0); if r < 0.80 then switch_for_tox=0; if r >= 0.80 then switch_for_tox=1;
* dol_higher_potency; dol_higher_potency = 0.5; * so 1.5 potency - as for efa - may 2019 in response to advance results;
* zdv_potency_p75; r=uniform(0); zdv_potency_p75 = 0; if r < 0.5 then zdv_potency_p75 = 1;
* rel_dol_tox; r=uniform(0); rel_dol_tox = 1; if r < 0.2 then rel_dol_tox = 2; * = 2 means same rate as efavirenz (although persistence still lower);
* zero_3tc_activity_m184; r=uniform(0); zero_3tc_activity_m184 = 0; if r < 0.2 then zero_3tc_activity_m184 = 1;
* zero_tdf_activity_k65r; r=uniform(0); zero_tdf_activity_k65r = 0; if r < 0.2 then zero_tdf_activity_k65r = 1;
* higher_rate_res_dol ; r=uniform(0); higher_rate_res_dol = 0; if r < 0.2 then higher_rate_res_dol = 1;
* res_trans_factor_ii ; r=uniform(0); res_trans_factor_ii = 1; if r < 0.2 then res_trans_factor_ii = 2;
* rate_birth_with_infected_child;
r=uniform(0); if r < 0.05 then rate_birth_with_infected_child = 0.3;
if 0.05 <= r < 0.30 then rate_birth_with_infected_child = 0.4 ; if 0.30 <= r < 0.90 then rate_birth_with_infected_child = 0.5 ;
if 0.90 <= r then rate_birth_with_infected_child = 0.6 ;
* nnrti_res_no_effect; r=uniform(0); nnrti_res_no_effect=0.25; if 0.95 <= r then nnrti_res_no_effect = 0.5;
if 0.20 <= r < 0.95 then nnrti_res_no_effect = 0 ;
* double_rate_gas_tox_taz; r=uniform(0); double_rate_gas_tox_taz = 1; if r < 0.5 then double_rate_gas_tox_taz=2;
* tox_weightg_dol ; r=uniform(0); tox_weightg_dol = 0; if r < 0.5 then tox_weightg_dol = 1;
* incr_mort_risk_dol_weightg ; r=uniform(0); if 0 <= r < 0.01 then incr_mort_risk_dol_weightg = 1;
if 0.01 <= r < 0.17 then incr_mort_risk_dol_weightg = 1.1;
if 0.17 <= r < 0.34 then incr_mort_risk_dol_weightg = 2 ; if 0.34 <= r < 0.51 then incr_mort_risk_dol_weightg = 2.1;
if 0.51 <= r < 0.68 then incr_mort_risk_dol_weightg = 2.2; if 0.68 <= r < 0.85 then incr_mort_risk_dol_weightg = 3 ;
if 0.85 <= r then incr_mort_risk_dol_weightg = 4 ;
* oth_dol_adv_birth_e_risk; r=uniform(0); if 0.0 <= r < 0.20 then oth_dol_adv_birth_e_risk = 0.0005;
if 0.20 <= r < 0.60 then oth_dol_adv_birth_e_risk = 0.0015;
if 0.60 <= r < 0.80 then oth_dol_adv_birth_e_risk = 0.0020;
if 0.80 <= r then oth_dol_adv_birth_e_risk = 0.0030;
* prop_bmi_ge23; r=uniform(0); prop_bmi_ge23 = 0.5; if r < 0.5 then prop_bmi_ge23 = 0.75;
* rr_int_tox ; r=uniform(0); if r < 0.33 then rr_int_tox = 2; if 0.33 <= r < 0.67 then rr_int_tox = 10;
if 0.67 <= r then rr_int_tox = 30;
*sw_art_disadv; r=uniform(0); if r < 0.50 then sw_art_disadv = 1; if 0.50 <= r then sw_art_disadv = 2;
if sw_art_disadv=1 then do; sw_higher_int = 1; prob_sw_lower_adh = 0; sw_higher_prob_loss_at_diag = 1; end;
if sw_art_disadv=2 then do; sw_higher_int = 2; prob_sw_lower_adh = 0.3; sw_higher_prob_loss_at_diag = 1.5; end;
* sw_program; r=uniform(0); sw_program=0;
if r < 0.20 then sw_program=1;
if sw_program = 1 then do; e=uniform(0); sw_program_effect = 1; if e < 0.5 then sw_program_effect = 2;
rate_engage_sw_program =0.10; rate_disengage_sw_program = 0.025; end;
* effect_weak_sw_prog_newp; r=uniform(0); if r < 0.33 then do; effect_weak_sw_prog_newp = 0.90; effect_strong_sw_prog_newp = 0.60; end;
* effect_strong_sw_prog_newp; if 0.33 <= r < 0.67 then do; effect_weak_sw_prog_newp = 0.80; effect_strong_sw_prog_newp = 0.50; end;
if 0.67 <= r then do; effect_weak_sw_prog_newp = 0.70; effect_strong_sw_prog_newp = 0.30; end;
***** prep;
* adh_pattern_prep; r=uniform(0); if r < 0.30 then adh_pattern_prep = 1; if 0.30 <= r < 0.6 then adh_pattern_prep = 2; if 0.6 <= r < 0.9 then adh_pattern_prep = 3; if 0.9 <= r then adh_pattern_prep = 4;
* rate_test_startprep; r=uniform(0); if r < 0.33 then rate_test_startprep = 0.25; if 0.33 <= r < 0.67 then rate_test_startprep = 0.5; if 0.67 <= r then rate_test_startprep = 0.75;*Additional rate of being tested for HIV before PrEP;
* dependent_on_time_step_length ;
* rate_test_restartprep; r=uniform(0); if r < 0.50 then rate_test_restartprep = 0.50; if 0.50 <= r then rate_test_restartprep = 0.80;
* dependent_on_time_step_length ;
* rate_choose_stop_prep; r=uniform(0); if r < 0.33 then rate_choose_stop_prep = 0.05; if 0.33 <= r < 0.67 then rate_choose_stop_prep = 0.15;
if 0.67 <= r then rate_choose_stop_prep = 0.30;
* dependent_on_time_step_length ;
* prob_prep_restart_choice; r=uniform(0); if r < 0.33 then prob_prep_restart_choice=0.05; if 0.33 <= r < 0.67 then prob_prep_restart_choice=0.10;
if 0.67 <= r then prob_prep_restart_choice=0.20;
* dependent_on_time_step_length ;
* prepuptake_sw; r=uniform(0); prepuptake_sw=0.5; if r > 0.8 then prepuptake_sw =0.10; if r < 0.2 then prepuptake_sw = 0.50;
* prepuptake_pop; r=uniform(0); prepuptake_pop=0.2; if r > 0.8 then prepuptake_pop =0.10; if r < 0.2 then prepuptake_pop = 0.5 ;
* note there are three parameters that affect use of prep besides the prep_strategy - prob_prep_b is prob of starting if prep_elig=1 and tested=1
and prep_willing = 1 - a person cannot be prep_elig=1 if hard_reach=1 - a person prep_elig=1 will only actually have a chance of starting prep
if prep_willing=1;
***** circumcision ;
* circ_inc_rate; r=uniform(0); if r < 0.10 then circ_inc_rate = 0.0001; if 0.10 <= r < 0.20 then circ_inc_rate = 0.001 ;
if 0.20 <= r < 0.8 then circ_inc_rate = 0.003; if 0.8 <= r < 0.9 then circ_inc_rate = 0.01; if 0.90 <= r then circ_inc_rate = 0.10;
*circ_inc_15_19;r=uniform(0); if r < 0.33 then circ_inc_15_19 = 1.5; if 0.33 <= r < 0.66 then circ_inc_15_19 =2.0 ;
if 0.66 <= r then circ_inc_15_19=3.0;
*circ_red_20_30;r=uniform(0); if r < 0.33 then circ_red_20_30 = 0.30; if 0.33 <= r < 0.66 then circ_red_20_30 = 0.40;
if 0.66 <= r then circ_red_20_30=0.50;
*circ_red_30_50;r=uniform(0); if r < 0.33 then circ_red_30_50 = 0.15; if 0.33 <= r < 0.66 then circ_red_30_50 = 0.25;
if 0.66 <= r then circ_red_30_50=0.35;
* rel_incr_circ_post_2013;r=uniform(0); if r < 0.10 then rel_incr_circ_post_2013 = 0.8; if 0.10 <= r < 0.35 then rel_incr_circ_post_2013 = 1;
if 0.35 <= r < 0.60 then rel_incr_circ_post_2013 = 3; if 0.60 <= r then rel_incr_circ_post_2013 = 7 ;
if circ_inc_rate=0.1 then rel_incr_circ_post_2013=min(rel_incr_circ_post_2013, 1);
* not * dependent_on_time_step_length ;
* prob_birth_circ; r=uniform(0); if r < 0.33 then prob_birth_circ = 0.03; if 0.33 <= r < 0.65 then prob_birth_circ = 0.05;
if 0.65 <= r < 0.98 then prob_birth_circ = 0.1; if r >= 0.98 then prob_birth_circ = 0.5;
***LBM Jul19 check data on circ;
* p_hard_reach_w; p_hard_reach_w=0.05+(uniform(0)*0.10); p_hard_reach_w = round(p_hard_reach_w, 0.01);
* hard_reach_higher_in_men; hard_reach_higher_in_men = 0.00 + (uniform(0)*0.10); hard_reach_higher_in_men = round(hard_reach_higher_in_men,0.01);
p_hard_reach_m = p_hard_reach_w + hard_reach_higher_in_men;
****** covid death risk ;
r=uniform(0); if r < 0.40 then cov_death_risk_mult = 1; if 0.4 <= r < 0.80 then cov_death_risk_mult = 2; if 0.8 <= r then cov_death_risk_mult = 3;
* ================ ;
* determining newp base categories for new sw;
if sw_init_newp=1 then do; p_sw_init_newp_g1=0.2; p_sw_init_newp_g2=0.6; p_sw_init_newp_g3= 0.10; p_sw_init_newp_g4=0.08; p_sw_init_newp_g5=0.02; end;
if sw_init_newp=2 then do; p_sw_init_newp_g1=0.4; p_sw_init_newp_g2=0.37; p_sw_init_newp_g3= 0.10; p_sw_init_newp_g4=0.08; p_sw_init_newp_g5=0.05; end;
if sw_init_newp=3 then do; p_sw_init_newp_g1=0.8; p_sw_init_newp_g2=0.02; p_sw_init_newp_g3= 0.02; p_sw_init_newp_g4=0.08; p_sw_init_newp_g5=0.08; end;
* transition probabilities between sex worker newp levels;
* sw newp levels are 1 newp = 0 2 newp 1-6 3 newp 7-20 4 newp 21-50 5 newp 51-150 ;
if sw_trans_matrix=1 then do;
sw_newp_lev_1_1 = 0.80 ; sw_newp_lev_1_2 = 0.17 ; sw_newp_lev_1_3 = 0.015 ; sw_newp_lev_1_4 = 0.010 ; sw_newp_lev_1_5 = 0.005 ;
sw_newp_lev_2_1 = 0.15 ; sw_newp_lev_2_2 = 0.80 ; sw_newp_lev_2_3 = 0.030 ; sw_newp_lev_2_4 = 0.015 ; sw_newp_lev_2_5 = 0.005 ;
sw_newp_lev_3_1 = 0.05 ; sw_newp_lev_3_2 = 0.10 ; sw_newp_lev_3_3 = 0.80 ; sw_newp_lev_3_4 = 0.045 ; sw_newp_lev_3_5 = 0.005 ;
sw_newp_lev_4_1 = 0.025 ; sw_newp_lev_4_2 = 0.025 ; sw_newp_lev_4_3 = 0.10 ; sw_newp_lev_4_4 = 0.80 ; sw_newp_lev_4_5 = 0.05 ;
sw_newp_lev_5_1 = 0.025 ; sw_newp_lev_5_2 = 0.025 ; sw_newp_lev_5_3 = 0.05 ; sw_newp_lev_5_4 = 0.10 ; sw_newp_lev_5_5 = 0.80 ;
end;
if sw_trans_matrix=2 then do;
sw_newp_lev_1_1 = 0.90 ; sw_newp_lev_1_2 = 0.10 ; sw_newp_lev_1_3 = 0.000 ; sw_newp_lev_1_4 = 0.000 ; sw_newp_lev_1_5 = 0.000 ;
sw_newp_lev_2_1 = 0.10 ; sw_newp_lev_2_2 = 0.80 ; sw_newp_lev_2_3 = 0.100 ; sw_newp_lev_2_4 = 0.000 ; sw_newp_lev_2_5 = 0.000 ;
sw_newp_lev_3_1 = 0.00 ; sw_newp_lev_3_2 = 0.10 ; sw_newp_lev_3_3 = 0.80 ; sw_newp_lev_3_4 = 0.100 ; sw_newp_lev_3_5 = 0.000 ;
sw_newp_lev_4_1 = 0.000 ; sw_newp_lev_4_2 = 0.000 ; sw_newp_lev_4_3 = 0.100 ; sw_newp_lev_4_4 = 0.80 ; sw_newp_lev_4_5 = 0.100;
sw_newp_lev_5_1 = 0.000 ; sw_newp_lev_5_2 = 0.000 ; sw_newp_lev_5_3 = 0.000 ; sw_newp_lev_5_4 = 0.10 ; sw_newp_lev_5_5 = 0.90 ;
end;
if sw_trans_matrix=3 then do;
sw_newp_lev_1_1 = 0.80 ; sw_newp_lev_1_2 = 0.05 ; sw_newp_lev_1_3 = 0.05 ; sw_newp_lev_1_4 = 0.050 ; sw_newp_lev_1_5 = 0.050 ;
sw_newp_lev_2_1 = 0.05 ; sw_newp_lev_2_2 = 0.80 ; sw_newp_lev_2_3 = 0.050 ; sw_newp_lev_2_4 = 0.050 ; sw_newp_lev_2_5 = 0.050 ;
sw_newp_lev_3_1 = 0.05 ; sw_newp_lev_3_2 = 0.05 ; sw_newp_lev_3_3 = 0.80 ; sw_newp_lev_3_4 = 0.050 ; sw_newp_lev_3_5 = 0.050 ;
sw_newp_lev_4_1 = 0.050 ; sw_newp_lev_4_2 = 0.050 ; sw_newp_lev_4_3 = 0.050 ; sw_newp_lev_4_4 = 0.80 ; sw_newp_lev_4_5 = 0.050;
sw_newp_lev_5_1 = 0.050 ; sw_newp_lev_5_2 = 0.050 ; sw_newp_lev_5_3 = 0.050 ; sw_newp_lev_5_4 = 0.05 ; sw_newp_lev_5_5 = 0.80 ;
end;
if sw_trans_matrix=4 then do;
sw_newp_lev_1_1 = 0.99 ; sw_newp_lev_1_2 = 0.01 ; sw_newp_lev_1_3 = 0.000 ; sw_newp_lev_1_4 = 0.000 ; sw_newp_lev_1_5 = 0.000 ;
sw_newp_lev_2_1 = 0.01 ; sw_newp_lev_2_2 = 0.98 ; sw_newp_lev_2_3 = 0.010 ; sw_newp_lev_2_4 = 0.000 ; sw_newp_lev_2_5 = 0.000 ;
sw_newp_lev_3_1 = 0.00 ; sw_newp_lev_3_2 = 0.01 ; sw_newp_lev_3_3 = 0.98 ; sw_newp_lev_3_4 = 0.010 ; sw_newp_lev_3_5 = 0.000 ;
sw_newp_lev_4_1 = 0.000 ; sw_newp_lev_4_2 = 0.000 ; sw_newp_lev_4_3 = 0.010 ; sw_newp_lev_4_4 = 0.98 ; sw_newp_lev_4_5 = 0.010;
sw_newp_lev_5_1 = 0.000 ; sw_newp_lev_5_2 = 0.000 ; sw_newp_lev_5_3 = 0.000 ; sw_newp_lev_5_4 = 0.01 ; sw_newp_lev_5_5 = 0.99 ;
end;
if sw_trans_matrix=5 then do;
sw_newp_lev_1_1 = 0.96 ; sw_newp_lev_1_2 = 0.01 ; sw_newp_lev_1_3 = 0.01 ; sw_newp_lev_1_4 = 0.01 ; sw_newp_lev_1_5 = 0.01 ;
sw_newp_lev_2_1 = 0.01 ; sw_newp_lev_2_2 = 0.96 ; sw_newp_lev_2_3 = 0.01 ; sw_newp_lev_2_4 = 0.01 ; sw_newp_lev_2_5 = 0.01 ;
sw_newp_lev_3_1 = 0.01 ; sw_newp_lev_3_2 = 0.01 ; sw_newp_lev_3_3 = 0.96 ; sw_newp_lev_3_4 = 0.01 ; sw_newp_lev_3_5 = 0.01 ;
sw_newp_lev_4_1 = 0.01 ; sw_newp_lev_4_2 = 0.01 ; sw_newp_lev_4_3 = 0.01 ; sw_newp_lev_4_4 = 0.96 ; sw_newp_lev_4_5 = 0.01;
sw_newp_lev_5_1 = 0.01 ; sw_newp_lev_5_2 = 0.01 ; sw_newp_lev_5_3 = 0.01 ; sw_newp_lev_5_4 = 0.01 ; sw_newp_lev_5_5 = 0.96 ;
end;
if sw_trans_matrix=6 then do;
sw_newp_lev_1_1 = 0.60 ; sw_newp_lev_1_2 = 0.10 ; sw_newp_lev_1_3 = 0.10 ; sw_newp_lev_1_4 = 0.100 ; sw_newp_lev_1_5 = 0.100 ;
sw_newp_lev_2_1 = 0.10 ; sw_newp_lev_2_2 = 0.60 ; sw_newp_lev_2_3 = 0.100 ; sw_newp_lev_2_4 = 0.100 ; sw_newp_lev_2_5 = 0.100 ;
sw_newp_lev_3_1 = 0.10 ; sw_newp_lev_3_2 = 0.10 ; sw_newp_lev_3_3 = 0.60 ; sw_newp_lev_3_4 = 0.100 ; sw_newp_lev_3_5 = 0.100 ;
sw_newp_lev_4_1 = 0.100 ; sw_newp_lev_4_2 = 0.100 ; sw_newp_lev_4_3 = 0.100 ; sw_newp_lev_4_4 = 0.60 ; sw_newp_lev_4_5 = 0.100;
sw_newp_lev_5_1 = 0.100 ; sw_newp_lev_5_2 = 0.100 ; sw_newp_lev_5_3 = 0.100 ; sw_newp_lev_5_4 = 0.10 ; sw_newp_lev_5_5 = 0.60 ;
end;
if sw_trans_matrix=7 then do;
sw_newp_lev_1_1 = 0.40 ; sw_newp_lev_1_2 = 0.15 ; sw_newp_lev_1_3 = 0.15 ; sw_newp_lev_1_4 = 0.150 ; sw_newp_lev_1_5 = 0.150 ;
sw_newp_lev_2_1 = 0.15 ; sw_newp_lev_2_2 = 0.40 ; sw_newp_lev_2_3 = 0.150 ; sw_newp_lev_2_4 = 0.150 ; sw_newp_lev_2_5 = 0.150 ;
sw_newp_lev_3_1 = 0.15 ; sw_newp_lev_3_2 = 0.15 ; sw_newp_lev_3_3 = 0.40 ; sw_newp_lev_3_4 = 0.150 ; sw_newp_lev_3_5 = 0.150 ;
sw_newp_lev_4_1 = 0.150 ; sw_newp_lev_4_2 = 0.150 ; sw_newp_lev_4_3 = 0.150 ; sw_newp_lev_4_4 = 0.40 ; sw_newp_lev_4_5 = 0.150;
sw_newp_lev_5_1 = 0.150 ; sw_newp_lev_5_2 = 0.150 ; sw_newp_lev_5_3 = 0.150 ; sw_newp_lev_5_4 = 0.15 ; sw_newp_lev_5_5 = 0.40 ;
end;
if sw_trans_matrix=8 then do;
sw_newp_lev_1_1 = 0.20 ; sw_newp_lev_1_2 = 0.30 ; sw_newp_lev_1_3 = 0.25 ; sw_newp_lev_1_4 = 0.150 ; sw_newp_lev_1_5 = 0.100 ;
sw_newp_lev_2_1 = 0.20 ; sw_newp_lev_2_2 = 0.30 ; sw_newp_lev_2_3 = 0.250 ; sw_newp_lev_2_4 = 0.150 ; sw_newp_lev_2_5 = 0.100 ;
sw_newp_lev_3_1 = 0.20 ; sw_newp_lev_3_2 = 0.30 ; sw_newp_lev_3_3 = 0.25 ; sw_newp_lev_3_4 = 0.150 ; sw_newp_lev_3_5 = 0.100 ;
sw_newp_lev_4_1 = 0.20 ; sw_newp_lev_4_2 = 0.30 ; sw_newp_lev_4_3 = 0.250 ; sw_newp_lev_4_4 = 0.15 ; sw_newp_lev_4_5 = 0.100;
sw_newp_lev_5_1 = 0.20 ; sw_newp_lev_5_2 = 0.30 ; sw_newp_lev_5_3 = 0.250 ; sw_newp_lev_5_4 = 0.15 ; sw_newp_lev_5_5 = 0.10 ;
end;
* test type;
*1= PCR (RNA VL) tests - assume window period of 10 days; * (sens_primary_ts1m = 0.67 as 10 days is 0.33 of 1 month);
*3= 3rd gen (Ab) tests / community-based POC tests / rapid tests - assume window period of 3 months;
*4= 4th gen (Ag/Ab) tests - assume window period of 1 month;
if hivtest_type=1 then do; sens_primary=0.86; sens_primary_ts1m = 0.67 ; sens_vct=0.98; spec_vct=1; end;
else if hivtest_type=3 then do; sens_primary=0; sens_primary_ts1m = 0 ; sens_vct=0.98; spec_vct=0.992; end;
else if hivtest_type=4 then do; sens_primary=0.65; sens_primary_ts1m = 0 ; sens_vct=0.98; spec_vct=1; test_4thgen=1; * test_4thgen=1 moved here mar19; end;
* COSTS;
* todo: ALL COSTS BELOW TO BE REVIEWED ;
* drug costs are perhaps 10% higher due to supply chain but for monitoring comparison this will not differ by option;
*cost of the following drugs updated in July 2014 based on MSF report, without including cost of supply chain;
* all * dependent_on_time_step_length ;
cost_zdv_a=(0.060/4)*1.2; * global fund aug18 ; * mf ;
cost_3tc_a=(0.017/4)*1.2; * jul 19 - south africa tender ;
cost_ten_a=(0.028/4)*1.2; * jul 19 - south africa tender ;
cost_taf = (0.018/4)*1.2;
cost_nev_a=(0.027/4)*1.2; * chai 2017 market report - global fund price;
cost_efa_a=(0.025/4)*1.2; * global fund jul18 ; * mf ;
cost_lpr_a=(0.152/4)*1.2;
cost_taz_a=(0.185/4)*1.2; * global fund aug18 ; * mf ;
cost_dol_a=(0.020/4)*1.2; * jul 19 - south africa tender ;
cost_dar_a=(0.200/4)*1.2;
tb_cost_a=(.050);
cot_cost_a=(.005/4);
vis_cost_a=(.020);
redn_in_vis_cost_vlm_supp = 0.010 ;
cost_child_hiv_a = 0.030;
cost_child_hiv_mo_art_a = 0.030;
prep_drug_cost = (0.050 * 1.2) / 4 ; * cost per 3 months; * 1.2 is supply chain cost;
prep_drug_cost_tld = (0.065 * 1.2) / 4 ; * cost per 3 months; * 1.2 is supply chain cost;
cost_prep_clinic = 0.010; *Clinic/Programme costs relating to PrEP use in HIV-negative individuals; * changed from 0.10 to 0.30 after input from gesine;
cost_prep_clinic_couns = 0.010; *Further clinic costs relating to adherence counselling;
* not * dependent_on_time_step_length ;
adc_cost_a=(.200);
who3_cost_a=(.020);
cd4_cost_a=(.010);
vl_cost_a=(.022);
vl_cost_plasma=0.022;
vl_cost_lab=0.022;
vl_cost_poc=0.022;
res_cost_a=(0.100);
cost_test_a=0.025; *HCW-testing symptomatic, it applies only to positive people with symptoms ;
cost_test_b=0.025; *HCW-testing general pop, HIV positive;
cost_test_c=0.0037; *HCW-testing general pop, hiv negative - changed 30dec2016 - email from anna osborne chai 8nov2016 - this is for facility based testing, which most testing is;
cost_test_d=0.02521; *HCW-testing positive (community based);
cost_test_e=0.0245; *HCW-testing negative (community based);
cost_t_adh_int = 0.010;
art_init_cost = 0.010; *Cost of ART initiation - Mar2017;
cost_switch_line_a = 0.020 ;
cost_drug_level_test = 0.015; * assume tdf drug level test can be $15 ;
circ_cost_a = 0.106; *LBM Jan 2019 VMMC trial 51.34+54.29 =106 ;
condom_dn_cost = 0.001 ; * average cost per adult aged 15-64 in population ;
sw_program_cost = 0.010 ; * placeholder;
* based on salomom et al lancet 2012;
util_tox = rand('beta',10,2); util_tox = 0.95;
if greater_disability_tox = 1 then util_tox = 0.75 ;
util_who3 = rand('beta',8,2); util_who3 = 0.78;
util_tb = rand('beta',7,7); util_tb = 0.60;
util_adc = rand('beta',2,6); util_adc = 0.46;
* util_rec_ntd = 0.8; * removed aug18 - since dont have this for mtct;
/*
* ts1m: running with monthly time steps - transformation of rate parameters ;
rate_ch_art_init_str_2011 = 1 - (1 - rate_ch_art_init_str_2011)**(1/3) ;
rate_want_no_more_children = 1 - (1 - rate_want_no_more_children )**(1/3) ;
rate_sti = 1 - (1 - rate_sti )**(1/3) ;
rate_persist_sti = 1 - (1 - rate_persist_sti )**(1/3) ;
sw_newp_lev_1_1 = 1 - (1 - sw_newp_lev_1_1 )**(1/3) ;
sw_newp_lev_1_2 = 1 - (1 - sw_newp_lev_1_2 )**(1/3) ;
sw_newp_lev_1_3 = 1 - (1 - sw_newp_lev_1_3 )**(1/3) ;
sw_newp_lev_1_4 = 1 - (1 - sw_newp_lev_1_4 )**(1/3) ;
sw_newp_lev_1_5 = 1 - (1 - sw_newp_lev_1_5 )**(1/3) ;
sw_newp_lev_2_1 = 1 - (1 - sw_newp_lev_2_1 )**(1/3) ;
sw_newp_lev_2_2 = 1 - (1 - sw_newp_lev_2_2 )**(1/3) ;
sw_newp_lev_2_3 = 1 - (1 - sw_newp_lev_2_3 )**(1/3) ;
sw_newp_lev_2_4 = 1 - (1 - sw_newp_lev_2_4 )**(1/3) ;
sw_newp_lev_2_5 = 1 - (1 - sw_newp_lev_2_5 )**(1/3) ;
sw_newp_lev_3_1 = 1 - (1 - sw_newp_lev_3_1 )**(1/3) ;
sw_newp_lev_3_2 = 1 - (1 - sw_newp_lev_3_2 )**(1/3) ;
sw_newp_lev_3_3 = 1 - (1 - sw_newp_lev_3_2 )**(1/3) ;
sw_newp_lev_3_4 = 1 - (1 - sw_newp_lev_3_4 )**(1/3) ;
sw_newp_lev_3_5 = 1 - (1 - sw_newp_lev_3_5 )**(1/3) ;
sw_newp_lev_4_1 = 1 - (1 - sw_newp_lev_4_1 )**(1/3) ;
sw_newp_lev_4_2 = 1 - (1 - sw_newp_lev_4_2 )**(1/3) ;
sw_newp_lev_4_3 = 1 - (1 - sw_newp_lev_4_3 )**(1/3) ;
sw_newp_lev_4_4 = 1 - (1 - sw_newp_lev_4_4 )**(1/3) ;
sw_newp_lev_4_5 = 1 - (1 - sw_newp_lev_4_5 )**(1/3) ;
sw_newp_lev_5_1 = 1 - (1 - sw_newp_lev_5_1 )**(1/3) ;
sw_newp_lev_5_2 = 1 - (1 - sw_newp_lev_5_2 )**(1/3) ;
sw_newp_lev_5_3 = 1 - (1 - sw_newp_lev_5_3 )**(1/3) ;
sw_newp_lev_5_4 = 1 - (1 - sw_newp_lev_5_4 )**(1/3) ;
sw_newp_lev_5_5 = 1 - (1 - sw_newp_lev_5_5 )**(1/3) ;
rate_newp0_rred_rc = 1 - (1 - rate_newp0_rred_rc )**(1/3) ;
rate_non_hiv_symptoms = 1 - (1 - rate_non_hiv_symptoms )**(1/3) ;
r_swi_efa_cns = 1 - (1 - r_swi_efa_cns )**(1/3) ;
r_swi_efa_ras = 1 - (1 - r_swi_efa_ras )**(1/3) ;
r_swi_nev_hep = 1 - (1 - r_swi_nev_hep )**(1/3) ;
r_swi_nev_ras = 1 - (1 - r_swi_nev_ras )**(1/3) ;
r_swi_zdv_nau = 1 - (1 - r_swi_zdv_nau )**(1/3) ;
r_swi_zdv_head = 1 - (1 - r_swi_zdv_head )**(1/3) ;
r_swi_zdv_lip= 1 - (1 - r_swi_zdv_lip )**(1/3) ;
r_swi_zdv_ane = 1 - (1 - r_swi_zdv_ane )**(1/3) ;
r_swi_zdv_lac = 1 - (1 - r_swi_zdv_lac )**(1/3) ;
r_swi_ten_neph = 1 - (1 - r_swi_ten_neph )**(1/3) ;
r_swi_lpr_nau = 1 - (1 - r_swi_lpr_nau )**(1/3) ;
r_swi_lpr_dia = 1 - (1 - r_swi_lpr_dia )**(1/3) ;
r_swi_taz_nau = 1 - (1 - r_swi_taz_nau )**(1/3) ;
r_swi_taz_dia = 1 - (1 - r_swi_taz_dia )**(1/3) ;
r_swi_dol_cns = 1 - (1 - r_swi_dol_cns )**(1/3) ;
rate_loss_acq_pim_offart = 1 - (1 - rate_loss_acq_pim_offart )**(1/3) ;
rate_loss_acq_iim_offart = 1 - (1 - rate_loss_acq_iim_offart )**(1/3) ;
r_nau_start_zdv_lpr = 1 - (1 - r_nau_start_zdv_lpr )**(1/3) ;
p_nau_stops_zdv_lpr = 1 - (1 - p_nau_stops_zdv_lpr )**(1/3) ;
r_dia_start_lpr = 1 - (1 - r_dia_start_lpr )**(1/3) ;
p_dia_stops_lpr = 1 - (1 - p_dia_stops_lpr )**(1/3) ;
r_dia_start_taz_dar = 1 - (1 - r_dia_start_taz_dar )**(1/3) ;
p_dia_stops_taz_dar = 1 - (1 - p_dia_stops_taz_dar )**(1/3) ;
r_ras_start_efa = 1 - (1 - r_ras_start_efa )**(1/3) ;
r_res_start_nev = 1 - (1 - r_res_start_nev )**(1/3) ;
r_weightg_start_dol = 1 - (1 - r_weightg_start_dol )**(1/3) ;
r_cns_start_efa = 1 - (1 - r_cns_start_efa )**(1/3) ;
p_cns_stops_efa = 1 - (1 - p_cns_stops_efa )**(1/3) ;
r_cns_start_dol = 1 - (1 - r_cns_start_dol )**(1/3) ;
p_cns_stops_dol = 1 - (1 - p_cns_stops_dol )**(1/3) ;
r_lip_start_zdv = 1 - (1 - r_lip_start_zdv )**(1/3) ;
r_hep_start_nev = 1 - (1 - r_hep_start_nev )**(1/3) ;
r_otx_start = 1 - (1 - r_otx_start )**(1/3) ;
r_ane_start_zdv = 1 - (1 - r_ane_start_zdv )**(1/3) ;
p_ane_stops_zdv = 1 - (1 - p_ane_stops_zdv )**(1/3) ;
r_head_start_zdv = 1 - (1 - r_head_start_zdv )**(1/3) ;
p_head_stops_zdv = 1 - (1 - p_head_stops_zdv )**(1/3) ;
r_lac_start_zdv = 1 - (1 - r_lac_start_zdv )**(1/3) ;
r_neph_start_ten = 1 - (1 - r_neph_start_ten )**(1/3) ;
p_neph_stops_ten = 1 - (1 - p_neph_stops_ten )**(1/3) ;
p_neph_stops_after_ten = 1 - (1 - p_neph_stops_after_ten )**(1/3) ;
eprate = 1 - (1 - eprate )**(1/3) ;
rate_exp_set_lower_p_vl1000 = 1 - (1 - rate_exp_set_lower_p_vl1000 )**(1/3) ;
prob_pregnancy_base = 1 - (1 - prob_pregnancy_base )**(1/3) ;
rate_loss_persistence = 1 - (1 - rate_loss_persistence )**(1/3) ;
rate_loss_nnres_pmtct_maj = 1 - (1 - rate_loss_nnres_pmtct_maj )**(1/3) ;
initial_rate_1sttest = 1 - (1 - initial_rate_1sttest )**(1/3) ;
test_rate_who4 = 1 - (1 - test_rate_who4 )**(1/3) ;
test_rate_tb = 1 - (1 - test_rate_tb )**(1/3) ;
test_rate_who3 = 1 - (1 - test_rate_who3 )**(1/3) ;
rate_lost = 1 - (1 - rate_lost )**(1/3) ;
rate_return = 1 - (1 - rate_return )**(1/3) ;
rate_restart = 1 - (1 - rate_restart )**(1/3) ;
pr_art_init = 1 - (1 - pr_art_init )**(1/3) ;
pr_switch_line = 1 - (1 - pr_switch_line )**(1/3) ;
prob_supply_interrupted = 1 - (1 - prob_supply_interrupted )**(1/3) ;
prob_supply_resumed = 1 - (1 - prob_supply_resumed )**(1/3) ;
poorer_cd4rise_fail_nn = 1 - (1 - poorer_cd4rise_fail_nn )**(1/3) ;
rate_int_choice = 1 - (1 - rate_int_choice )**(1/3) ;
rate_loss_acq_nnm_offart = 1 - (1 - rate_loss_acq_nnm_offart )**(1/3) ;
rate_test_onprep = 1 - (1 - rate_test_onprep )**(1/3) ;
prob_prep_restart = 1 - (1 - prob_prep_restart )**(1/3) ;
prob_prep_restart_choice = 1 - (1 - prob_prep_restart_choice )**(1/3) ;
pop_wide_tld_prob_egfr = 1 - (1 - pop_wide_tld_prob_egfr )**(1/3) ;
base_rate_sw = 1 - (1 - base_rate_sw )**(1/3) ;
base_rate_stop_sexwork = 1 - (1 - base_rate_stop_sexwork )**(1/3) ;