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

How does this work: short term migration - exp_setting_lower_p_vl1000 #155

Open
mmcleod89 opened this issue Oct 26, 2023 · 5 comments
Open

Comments

@mmcleod89
Copy link
Collaborator

mmcleod89 commented Oct 26, 2023

* short term migration - exp_setting_lower_p_vl1000; * mar19;

* if exposed elsewhere externaly, partners may be less likely to be suppressed, i.e u1=lower % supressed;
if exp_setting_lower_p_vl1000 = 1 and 20 <= age < 50 then do;
	r=rand('uniform');  * dependent_on_time_step_length;
	if (gender = 1 and r < rate_exp_set_lower_p_vl1000) or (gender = 2 and r < rate_exp_set_lower_p_vl1000 / 2) then do;
		u1 = u1 / external_exp_factor;
	end;
end;


cu_1=.;cu_2=.;cu_3=.;cu_4=.;cu_5=.;cu_6=.;
cu_1=u1;cu_2=cu_1+u2;cu_3=cu_2+u3;cu_4=cu_3+u4;cu_5=cu_4+u5; cu_6=cu_5+u6;

*   vlg1 < 2.7    vlg2  2.7-3.7  vlg3  3.7-4.7   vlg4  4.7-5.7    vlg5  > 5.7    vlg6  primary;
@mmcleod89
Copy link
Collaborator Author

mmcleod89 commented Oct 26, 2023

The values u1 to u6 are proportions of a demographic group which are in a given viral load group.
This code changes only the first group, so that these probabilities would no longer add up to 1.
In code below if the cumulative value is less than 1 then there is a chance that none of the statements will execute

if t ge 2 and nip gt 0 then do;
	d=1;do until (d gt nip);
		risk_nip=0;  * dependent_on_time_step_length ;  
		a=rand('uniform');
		if                   a < cu_1/cu_6 then do; risk_nip = max(0,(tr_rate_undetec_vl*fold_tr_newp)+(0.000025*rand('normal'))); vl_source=1; t_prop_rm=t_prop_vlg1_rm; end; *new for prep;
		else if cu_1/cu_6 <= a < cu_2/cu_6 then do; risk_nip = max(0,(0.01*fold_tr*fold_tr_newp)+(0.0025*rand('normal')));       vl_source=2; t_prop_rm=t_prop_vlg2_rm; end; *new for prep;
		else if cu_2/cu_6 <= a < cu_3/cu_6 then do; risk_nip = max(0,(0.03*fold_tr*fold_tr_newp)+(0.0075*rand('normal')));       vl_source=3; t_prop_rm=t_prop_vlg3_rm; end; *new for prep;
		else if cu_3/cu_6 <= a < cu_4/cu_6 then do; risk_nip = max(0,(0.06*fold_tr*fold_tr_newp)+(0.015*rand('normal')));        vl_source=4; t_prop_rm=t_prop_vlg4_rm; end; *new for prep;
		else if cu_4/cu_6 <= a < cu_5/cu_6 then do; risk_nip = max(0,(0.10*fold_tr*fold_tr_newp)+(0.025*rand('normal')));        vl_source=5; t_prop_rm=t_prop_vlg5_rm; end; *new for prep;
		else if cu_5/cu_6 <= a < cu_6/cu_6 then do; risk_nip = max(0,(tr_rate_primary*fold_tr_newp)+(0.075*rand('normal')));       vl_source=6; t_prop_rm=t_prop_vlg6_rm; end; *new for prep;

@mmcleod89
Copy link
Collaborator Author

@andrew-phillips-1
This would leave risk_nip equal to 0. Is this the idea? What is the short term migration code modelling?

@andrew-phillips-1
Copy link

@mmcleod89 Hi Michael The intent is that the "cu_x" variables are the cumulative value of u for numbers up to and including category x. So having cu_6 as the denominator should mean the values are between 0 and 1 ? Or have I made a mistake here ?

@mmcleod89
Copy link
Collaborator Author

Yes, you're right, the cu_6 as a denominator will re-normalise everything so that the values are between 0 and 1.
So what does the short term migration code model? It reduces the size of the first probability (u1 = u1 / external_exp_factor) and leaves the rest alone, so it reduces the relative chance of a low viral load relative to higher viral loads / primary infection categories?

@andrew-phillips-1
Copy link

Yes the intent is to consider that a person from the population may have had sex with someone outside the community so the viral load profile of the such people will not necessarily be a reflection of the viral load distribution in our population. In a closed community some kind of 100% treatment coverage would eliminate new transmission, but if people can go outside this setting and have sex and come back then there will still be new HIV cases. That was the thinking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants