Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating testing code #291

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions hiv_synthesis.sas
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ newp_seed = 7;

* date_start_testing; date_start_testing = 2003.5;
* initial_rate_1sttest; initial_rate_1sttest = 0; * dependent_on_time_step_length ;
* initial_rate_reptest; initial_rate_reptest = 0;
* test_rate_who4; test_rate_who4=0.10; * dependent_on_time_step_length ;
* test_rate_tb; test_rate_tb =0.10; * dependent_on_time_step_length ;
* test_rate_non_tb_who3; test_rate_non_tb_who3=0.05; * dependent_on_time_step_length ;
Expand Down Expand Up @@ -3076,7 +3077,7 @@ end;

* RATE OF TESTING WHEN HAVE non_tb_who3, WHO4 or TB and for GENERAL POPULATION;

if date_start_testing lt caldate{t} le 2015 then do;
if date_start_testing lt caldate{t} le 2015 then do;
test_rate_who4 = min(0.9,test_rate_who4*incr_test_rate_sympt);
test_rate_tb = min(0.8,test_rate_tb*incr_test_rate_sympt);
test_rate_non_tb_who3 = min(0.7,test_rate_non_tb_who3*incr_test_rate_sympt); * 0.7 mar19;
Expand All @@ -3090,18 +3091,21 @@ if date_start_testing lt caldate{t} le 2015 then do;
np_lasttest=0; newp_lasttest_tested_this_per=newp_lasttest; newp_lasttest=0;
end;
end;
end;
end;



tested_anc=.;

if t ge 2 and date_start_testing <= caldate{t} then do;
if t ge 2 and date_start_testing <= caldate{t} then do; * note that date_start_testing is never changed from 2003.5;

rate_1sttest = initial_rate_1sttest + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_reptest = 0.0000 + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_1sttest_2011 = initial_rate_1sttest + (min(2011,date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_reptest_2011 = 0.0000 + (min(2011,date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_1sttest = initial_rate_1sttest; rate_reptest = initial_rate_reptest;
if caldate{t} >= date_start_testing+5.5 then do;
rate_1sttest = initial_rate_1sttest + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_reptest = initial_rate_reptest + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_1sttest_2011 = initial_rate_1sttest + (min(2011,date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
rate_reptest_2011 = initial_rate_reptest + (min(2011,date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test;
end;
if gender=2 then do; rate_1sttest = rate_1sttest * rr_testing_female ; rate_reptest = rate_reptest * rr_testing_female ; end;

end;
Expand All @@ -3112,7 +3116,7 @@ if caldate{t} >= 2022 then do;
***Assuming testing rates are stable after 2022 by multiplying by fold_rate_decr_test_future;
if incr_test_year_i = 3 then do;
rate_1sttest = initial_rate_1sttest + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test - ((caldate{t}-2022 )*an_lin_incr_test*fold_rate_decr_test_future);
rate_reptest = 0.0000 + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test - ((caldate{t}-2022)*an_lin_incr_test*fold_rate_decr_test_future);
rate_reptest = initial_rate_reptest + (min(caldate{t},date_test_rate_plateau)-(date_start_testing+5.5))*an_lin_incr_test - ((caldate{t}-2022)*an_lin_incr_test*fold_rate_decr_test_future);
if gender=2 then do; rate_1sttest = rate_1sttest * rr_testing_female ; rate_reptest = rate_reptest * rr_testing_female ; end;
if . lt rate_1sttest lt rate_1sttest_2011 then rate_1sttest = rate_1sttest_2011;
if . lt rate_reptest lt rate_reptest_2011 then rate_reptest = rate_reptest_2011;
Expand Down
Loading