Skip to content

Commit

Permalink
Merge pull request #289 from UCL/update-naming-condom-change
Browse files Browse the repository at this point in the history
Change variable name to condom_change_year_i
  • Loading branch information
jennifersmith203 authored May 23, 2024
2 parents 1cd36d6 + 3e393b2 commit c6a1168
Showing 1 changed file with 40 additions and 34 deletions.
74 changes: 40 additions & 34 deletions hiv_synthesis.sas
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ newp_seed = 7;

* SEXUAL BEHAVIOUR;

* condom_incr_year_i; condom_incr_year_i = 0; * mar19; * initialising condom_incr_year_i - this is set again in year_i variables section;
* condom_change_year_i; condom_change_year_i = 0; * mar19; * initialising condom_change_year_i - this is set again in year_i variables section;
* rr_sw_age_1519; rr_sw_age_1519 = 0.80;
* rr_sw_age_2534; rr_sw_age_2534 = 0.30;
* rr_sw_age_3549; rr_sw_age_3549 = 0.03;
Expand Down Expand Up @@ -2165,8 +2165,8 @@ if caldate_never_dot >= &year_interv then do;
* we need to use caldate_never_dot so that the parameter value is given to everyone in the data set - we use the value for serial_no = 100000
who may be dead and hence have caldate{t} missing;

*Option 0 is continuation at current rates;
*Option 1 is essential scenario for Zimbabwe;
*Option 0 is continuation at current rates - status quo;
*Option 1 is minimal scenario for Zimbabwe;
*Option 2,3,4,5,6,7 are essential + 1 testing strategy; *Vale;
*Option 10,11,12,13,14 are essential + different prevention strategies; *Jenny;
*Option 15,16,17,18 are essential + Oral TDF/FTC PrEP for different sub-pops; *Jenny;
Expand All @@ -2188,9 +2188,8 @@ who may be dead and hence have caldate{t} missing;
*Note: at the moment the other testing modalities to be swicthed off are not modelled;

*Prevention;
*Condom promotion and provision: currently not in essential scenario but under discussion;
*SBCC: not explicitly modelled, but the switch off is;
*condom_incr_year_i=2; *Switches off SBCC;
*condom_change_year_i=2; *Switches off SBCC;
circ_inc_rate_year_i = 2; *No VMMC;

*Prep;
Expand Down Expand Up @@ -2222,7 +2221,6 @@ who may be dead and hence have caldate{t} missing;
end;


*TESTING;
*TESTING;
if option = 2 then do; *Self-test kits distributed (Primary distribution);
prob_self_test_hard_reach = 0.1;
Expand All @@ -2247,6 +2245,7 @@ who may be dead and hence have caldate{t} missing;

*PREVENTION;
if option = 10 then do;*HIV P&T program targeting FSWf;
eff_sw_program = 1;
end;
if option = 11 then do;*Social and behavioral change communication (SBCC);
end;
Expand Down Expand Up @@ -2742,7 +2741,7 @@ if caldate{t} = &year_interv then do;
if mihpsa_params_set_in_options ne 1 then circ_inc_rate_year_i = 0; *variations coded in circumcision section;

*increase in condom use;
if mihpsa_params_set_in_options ne 1 then condom_incr_year_i = 0; *coded within core (not below options code);
if mihpsa_params_set_in_options ne 1 then condom_change_year_i = 0; *coded within core (not below options code);

*population wide tld;
pop_wide_tld = 0;
Expand Down Expand Up @@ -3469,7 +3468,7 @@ if 2025 < caldate{t} then rred_rc = (ych_risk_beh_newp**(2000-1995))*(yc

if condom_disrup_covid = 1 and covid_disrup_affected = 1 then rred_rc = rred_rc * 1.5;
*
condom_incr_year_i = 2 refers to SBCC being switched off,
condom_change_year_i = 2 refers to SBCC being switched off,
SBCC in Zimbabwe was introduced at least in 2011
In 2011 rred_rc depending on the sampling varies from 0.031 (ych_risk_beh_newp = 0.5, ych2_risk_beh_newp =0.975)
0.168 (ych_risk_beh_newp = 0.7, ych2_risk_beh_newp =1)
Expand All @@ -3482,7 +3481,7 @@ if condom_disrup_covid = 1 and covid_disrup_affected = 1 then rred_rc = rred_rc
and 1 if we assume it was implemented from 1995
if SBBC implemented before 2000 then it shoudl affect ch_risk_beh_ep.
We have not modelled SBBC retrospectively and so we have not included its cost;
if caldate{t} >= &year_interv and condom_incr_year_i = 2 then do;
if caldate{t} >= &year_interv and condom_change_year_i = 2 then do;
*rred_rc =rred_rc2021_+((rred_rc2011_-rred_rc2021_)*prop_redattr_sbcc);
rred_rc =rred_rc2021_+((1-rred_rc2021_)*prop_redattr_sbcc);
end;
Expand All @@ -3492,7 +3491,7 @@ ch_risk_beh_ep=1.0;
if 1995 < caldate{t} <= 2000 then ch_risk_beh_ep = ych_risk_beh_ep**(caldate{t}-1995);
if caldate{t} = 2000 then ch_risk_beh_ep2000_ = ych_risk_beh_ep**(2000-1995);
if caldate{t} > 2000 then ch_risk_beh_ep = ch_risk_beh_ep2000_;
if caldate{t} >= &year_interv and condom_incr_year_i = 2 then
if caldate{t} >= &year_interv and condom_change_year_i = 2 then
ch_risk_beh_ep = ch_risk_beh_ep2000_+((1-ch_risk_beh_ep2000_)*prop_redattr_sbcc);


Expand Down Expand Up @@ -4300,7 +4299,7 @@ end;


* Reducing newp by 50% if condom incr =1;
if caldate{t} = &year_interv and condom_incr_year_i = 1 then do;
if caldate{t} = &year_interv and condom_change_year_i = 1 then do;
u=rand('uniform'); if u < 0.50 then do;newp=newp/2;newp=round(newp,1);end;
end;

Expand Down Expand Up @@ -4849,7 +4848,7 @@ end;
u_self_test=rand('uniform');
if . < np_lasttest <= 0 then u_self_test = u_self_test * eff_self_test_targeting;
if newp_lasttest ge 1 then u_self_test=u_self_test/eff_self_test_targeting;
if secondary_self_test=1 and eponart=1 then u_self_test=u_self_test/secondary_self_test_targeting;
if secondary_self_test=1 and epart=1 then u_self_test=u_self_test/secondary_self_test_targeting;
if tested ne 1 and (caldate{t]-max(0,dt_last_self_test) >= 0.25) and u_self_test < rate_self_test then do;
self_tested=1;
dt_last_self_test=caldate{t};
Expand Down Expand Up @@ -12544,7 +12543,6 @@ if 15 <= age < 65 then alive1564=1;else alive1564=0;
if 15 <= age < 65 and gender=1 then alive1564_m=1;else alive1564_m=0;
if 15 <= age < 65 and gender=2 then alive1564_w=1;else alive1564_w=0;

ageg014_=0;if 0 <= age < 15 then ageg014_=1;
age_1849w=0;if 18 <= age < 50 and gender=2 then age_1849w=1;
age_1844m=0;if 18 <= age < 45 and gender=1 then age_1844m=1;
age_1844w=0;if 18 <= age < 45 and gender=2 then age_1844w=1;
Expand Down Expand Up @@ -14761,6 +14759,10 @@ if prep_elig_hivneg = 1 and (prep_any=1 or prep_oral=1 or prep_inj=1 or prep_vr=
prep_elig_onprep = 0;
if prep_any_elig=1 and (prep_any=1 or prep_oral=1 or prep_inj=1 or prep_vr=1) then prep_elig_onprep = 1;

* of people on prep, proportion on prep_oral;
prep_elig_onprep_oral=0;
if prep_elig_onprep = 1 and prep_oral=1 then prep_elig_onprep_oral=1;

* of people on prep, proportion on prep_inj;
prep_elig_onprep_inj=0;
if prep_elig_onprep = 1 and prep_inj=1 then prep_elig_onprep_inj=1;
Expand Down Expand Up @@ -17001,10 +17003,12 @@ if 15 <= age and (death = . or caldate&j = death ) then do;
s_on_risk_informed_prep_oral + on_risk_informed_prep_oral; s_on_risk_informed_prep_inj + on_risk_informed_prep_inj;
s_on_risk_informed_prep_vr + on_risk_informed_prep_vr;

s_all_prep_criteria + all_prep_criteria ; s_all_prep_criteria_hivneg + all_prep_criteria_hivneg; s_prep_elig_hivneg + prep_elig_hivneg ;
s_prep_elig_hivneg_onprep + prep_elig_hivneg_onprep ; s_prep_elig_onprep + prep_elig_onprep ;s_prep_elig_onprep_inj + prep_elig_onprep_inj;
s_started_prep_inj_hiv + started_prep_inj_hiv; s_prep_elig_onprep_vr + prep_elig_onprep_vr; s_started_prep_vr_hiv + started_prep_vr_hiv;
s_started_prep_any_hiv + started_prep_any_hiv; s_pop_wide_tld_hiv + pop_wide_tld_hiv; s_pop_wide_tld_prep_elig + pop_wide_tld_prep_elig ;
s_all_prep_criteria + all_prep_criteria ; s_all_prep_criteria_hivneg + all_prep_criteria_hivneg ; s_prep_elig_hivneg + prep_elig_hivneg ;
s_prep_elig_hivneg_onprep + prep_elig_hivneg_onprep ; s_prep_elig_onprep + prep_elig_onprep ;
s_prep_elig_onprep_oral + prep_elig_onprep_oral ; s_prep_elig_onprep_inj + prep_elig_onprep_inj ; s_prep_elig_onprep_vr + prep_elig_onprep_vr ;
s_started_prep_any_hiv + started_prep_any_hiv ;
s_started_prep_oral_hiv + started_prep_oral_hiv ; s_started_prep_inj_hiv + started_prep_inj_hiv ; s_started_prep_vr_hiv + started_prep_vr_hiv ;
s_pop_wide_tld_hiv + pop_wide_tld_hiv; s_pop_wide_tld_prep_elig + pop_wide_tld_prep_elig ;
s_pop_wide_tld_neg_prep_inelig + pop_wide_tld_neg_prep_inelig;


Expand Down Expand Up @@ -17571,7 +17575,6 @@ if 0 <= age and (death = . or caldate&j = death ) then do;
s_vmmc1014m + vmmc1014m ;
s_new_vmmc + new_vmmc ; s_new_vmmc1014m + new_vmmc1014m ;
s_ageg1014m + ageg1014m;
s_ageg014_ + ageg014_;
end;

if age=0 and (death = . or caldate&j = death ) then s_alive0_ + alive0_;
Expand Down Expand Up @@ -18522,7 +18525,7 @@ s_n cald run option
s_alive0_
s_alive1549 s_alive1549_w s_alive1549_m s_alive1564 s_alive1564_w s_alive1564_m
s_ageg1517m s_ageg1819m s_ageg1519m s_ageg2024m s_ageg2529m s_ageg3034m s_ageg3539m s_ageg4044m
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m s_ageg014_
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m
s_ageg1517w s_ageg1819w s_ageg1519w s_ageg2024w s_ageg2529w s_ageg3034w s_ageg3539w s_ageg4044w
s_ageg4549w s_ageg5054w s_ageg5559w s_ageg6064w s_ageg1564w s_ageg1549w s_age_1844w
s_ageg1m s_ageg2m s_ageg3m s_ageg4m s_ageg5m s_ageg1w s_ageg2w s_ageg3w s_ageg4w s_ageg5w
Expand Down Expand Up @@ -18761,7 +18764,7 @@ s_newp_this_per_hivneg_m s_newp_this_per_hivneg_w s_newp_this_per_hivneg_age
s_newp_this_per_hivneg_m_prep s_newp_this_per_hivneg_w_prep s_newp_tp_hivneg_age1524w_prep s_newp_this_per_hivneg_sw_prep s_pep_not_prep

s_testfor_prep_oral s_testfor_prep_inj s_testfor_prep_vr s_prep_oral s_prep_inj s_prep_vr s_prep_oral_ever s_prep_inj_ever s_prep_vr_ever
s_last_prep_used s_stop_prep_inj_choice
s_last_prep_used s_stop_prep_inj_choice s_stop_prep_vr_choice
s_stop_prep_oral_elig s_stop_prep_inj_elig s_stop_prep_any_elig s_prep_oral_willing s_prep_inj_willing s_prep_oral_at_infection s_prep_inj_at_infection
s_stop_prep_vr_elig s_prep_vr_willing s_prep_vr_at_infection

Expand All @@ -18779,9 +18782,10 @@ s_on_risk_informed_prep_oral s_on_risk_informed_prep_inj s_on_risk_informed_prep
s_start_restart_prep_oral s_start_restart_prep_inj s_start_restart_prep_inj_prim s_start_rest_prep_inj_prim_cabr
s_start_restart_prep_vr s_start_restart_prep_vr_prim

s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep s_prep_elig_onprep s_prep_elig_onprep_inj
s_prep_elig_onprep_vr
s_started_prep_inj_hiv s_started_prep_vr_hiv s_started_prep_any_hiv s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig
s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep
s_prep_elig_onprep s_prep_elig_onprep_oral s_prep_elig_onprep_inj s_prep_elig_onprep_vr
s_started_prep_any_hiv s_started_prep_oral_hiv s_started_prep_inj_hiv s_started_prep_vr_hiv
s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig



Expand Down Expand Up @@ -19179,7 +19183,7 @@ discount

/*year_i interventions*/
/* NB: everyone in the data set must have the same value for these parameters for them to be included (since we take the value for the last person) */
condom_incr_year_i incr_test_year_i decr_hard_reach_year_i incr_adh_year_i
condom_change_year_i incr_test_year_i decr_hard_reach_year_i incr_adh_year_i
decr_prob_loss_at_diag_year_i absence_cd4_year_i absence_vl_year_i decr_rate_lost_year_i decr_rate_lost_art_year_i incr_rate_return_year_i
incr_rate_restart_year_i incr_rate_init_year_i decr_rate_int_choice_year_i incr_prob_vl_meas_done_year_i
incr_pr_switch_line_year_i incr_adh_prep_oral_yr_i poc_vl_monitoring_i
Expand Down Expand Up @@ -19308,7 +19312,7 @@ if country = 'Zimbabwe' then do;
if cald = 2004.5 and (prevalence1549 < 0.07) then do; abort abend; end;
if cald = 2015.5 and (prevalence1549 < 0.12 or prevalence1549 > 0.15 ) then do; abort abend; end;*ZIMPHIA 13.4;
end;
/*if cald = &year_interv and (prevalence1549 > 0.30 or incidence1549 < 0.15 ) then do; abort abend; end;*/ *QUERY should we be using this line for Zim? JAS Feb24;


* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
Expand Down Expand Up @@ -19494,7 +19498,7 @@ s_n cald
s_alive0_
s_alive1549 s_alive1549_w s_alive1549_m s_alive1564 s_alive1564_w s_alive1564_m
s_ageg1517m s_ageg1819m s_ageg1519m s_ageg2024m s_ageg2529m s_ageg3034m s_ageg3539m s_ageg4044m
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m s_ageg014_
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m
s_ageg1517w s_ageg1819w s_ageg1519w s_ageg2024w s_ageg2529w s_ageg3034w s_ageg3539w s_ageg4044w
s_ageg4549w s_ageg5054w s_ageg5559w s_ageg6064w s_ageg1564w s_ageg1549w s_age_1844w
s_ageg1m s_ageg2m s_ageg3m s_ageg4m s_ageg5m s_ageg1w s_ageg2w s_ageg3w s_ageg4w s_ageg5w
Expand Down Expand Up @@ -19750,9 +19754,10 @@ s_on_risk_informed_prep_oral s_on_risk_informed_prep_inj s_on_risk_informed_prep
s_start_restart_prep_oral s_start_restart_prep_inj s_start_restart_prep_vr s_start_restart_prep_inj_prim s_start_restart_prep_vr_prim
s_start_rest_prep_inj_prim_cabr

s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep s_prep_elig_onprep s_prep_elig_onprep_inj
s_prep_elig_onprep_vr
s_started_prep_inj_hiv s_started_prep_vr_hiv s_started_prep_any_hiv s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig
s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep
s_prep_elig_onprep s_prep_elig_onprep_oral s_prep_elig_onprep_inj s_prep_elig_onprep_vr
s_started_prep_any_hiv s_started_prep_oral_hiv s_started_prep_inj_hiv s_started_prep_vr_hiv
s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig

/*testing and diagnosis*/
s_tested s_tested_m s_tested_f s_tested_f_non_anc s_tested_ancpd s_test_anclabpd s_tested_1524w s_tested_f_anc s_ever_tested_m s_ever_tested_w s_firsttest
Expand Down Expand Up @@ -20472,7 +20477,7 @@ run cald option
s_alive0_
s_alive1549 s_alive1549_w s_alive1549_m s_alive1564 s_alive1564_w s_alive1564_m
s_ageg1517m s_ageg1819m s_ageg1519m s_ageg2024m s_ageg2529m s_ageg3034m s_ageg3539m s_ageg4044m
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m s_ageg014_
s_ageg4549m s_ageg5054m s_ageg5559m s_ageg6064m s_ageg1564m s_ageg1549m s_age_1844m s_ageg1014m
s_ageg1517w s_ageg1819w s_ageg1519w s_ageg2024w s_ageg2529w s_ageg3034w s_ageg3539w s_ageg4044w
s_ageg4549w s_ageg5054w s_ageg5559w s_ageg6064w s_ageg1564w s_ageg1549w s_age_1844w
s_ageg1m s_ageg2m s_ageg3m s_ageg4m s_ageg5m s_ageg1w s_ageg2w s_ageg3w s_ageg4w s_ageg5w
Expand Down Expand Up @@ -20729,9 +20734,10 @@ s_on_risk_informed_prep_oral s_on_risk_informed_prep_inj s_on_risk_informed_prep
s_start_restart_prep_oral s_start_restart_prep_inj s_start_restart_prep_vr s_start_restart_prep_inj_prim s_start_restart_prep_vr_prim
s_start_rest_prep_inj_prim_cabr

s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep s_prep_elig_onprep s_prep_elig_onprep_inj
s_prep_elig_onprep_vr
s_prep_oral_restart_date_choice s_started_prep_vr_hiv s_started_prep_any_hiv s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig
s_all_prep_criteria s_all_prep_criteria_hivneg s_prep_elig_hivneg s_prep_elig_hivneg_onprep
s_prep_elig_onprep s_prep_elig_onprep_oral s_prep_elig_onprep_inj s_prep_elig_onprep_vr
s_started_prep_any_hiv s_started_prep_oral_hiv s_started_prep_inj_hiv s_started_prep_vr_hiv
s_pop_wide_tld_hiv s_pop_wide_tld_prep_elig s_pop_wide_tld_neg_prep_inelig

/*testing and diagnosis*/
s_tested s_tested_m s_tested_f s_tested_f_non_anc s_tested_ancpd s_test_anclabpd s_tested_1524w s_tested_f_anc s_ever_tested_m s_ever_tested_w s_firsttest
Expand Down Expand Up @@ -21126,7 +21132,7 @@ prob_stop_anti_hypertensive prob_intensify_1_2 prob_intensify_2_3 effect_sbp_cvd
discount

/*year_i interventions*/
condom_incr_year_i incr_test_year_i decr_hard_reach_year_i incr_adh_year_i
condom_change_year_i incr_test_year_i decr_hard_reach_year_i incr_adh_year_i
decr_prob_loss_at_diag_year_i absence_cd4_year_i absence_vl_year_i decr_rate_lost_year_i decr_rate_lost_art_year_i incr_rate_return_year_i
incr_rate_restart_year_i incr_rate_init_year_i decr_rate_int_choice_year_i incr_prob_vl_meas_done_year_i
incr_pr_switch_line_year_i incr_adh_prep_oral_yr_i poc_vl_monitoring_i
Expand Down

0 comments on commit c6a1168

Please sign in to comment.