Skip to content

Commit

Permalink
lastest updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbenitezp committed Nov 4, 2022
1 parent 216a1e1 commit 82186a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aspics/kernels/ramp_ua.cl
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ float get_mortality_prob_for_age(ushort age, ushort sex, int origin, ushort cvd,

//printf("Age_ID: %d, Origin: %d, Initial BMI: %f, Odds: %f, Probability: %f\n", age, originNew, new_bmi, oddBMI, probaOrigin);

//new_bmi = 26.7;
//new_bmi = 40.0;
//new_bmi = 26.7; //Scenario 2
//new_bmi = 40.0; //Scenario 3
if (new_bmi <= 0.0){ // Negatives are missing values from SPC, treat as neutral case (odds of 1)
oddBMI = 1.0;
} else if (new_bmi < lower_new_bmi){ ///// if New_BMI is lower than threshold, then set to threshold //////
oddBMI = params->bmi_multipliers[originNew * 4] + params->bmi_multipliers[originNew * 4 + 1] * lower_new_bmi + params->bmi_multipliers[originNew * 4 + 2] * pown(lower_new_bmi,2) + params->bmi_multipliers[originNew * 4 + 3] * pown(lower_new_bmi,3);
//} else if (new_bmi > 26.7){
//} else if (new_bmi > 26.7){ //Scenario 4
// oddBMI = params->bmi_multipliers[originNew * 4] + params->bmi_multipliers[originNew * 4 + 1] * 0.99 * new_bmi + params->bmi_multipliers[originNew * 4 + 2] * pown(0.99 * new_bmi,2) + params->bmi_multipliers[originNew * 4 + 3] * pown(0.99 * new_bmi,3);
//} else if (new_bmi > 27.7){
//} else if (new_bmi > 27.7){ //Scenario 5
// oddBMI = params->bmi_multipliers[originNew * 4] + params->bmi_multipliers[originNew * 4 + 1] * (new_bmi - 1) + params->bmi_multipliers[originNew * 4 + 2] * pown(new_bmi -1,2) + params->bmi_multipliers[originNew * 4 + 3] * pown(new_bmi - 1,3);
//} else if (new_bmi > 50){ //oddBMI is calculated using 50 for [!!! BMI VARIABLE !!!]}
//} else if (new_bmi > 50){ //oddBMI is calculated using 50 for [!!! BMI VARIABLE !!!]} //Scenario 6
// oddBMI = params->bmi_multipliers[originNew * 4] + params->bmi_multipliers[originNew * 4 + 1] * 50 + params->bmi_multipliers[originNew * 4 + 2] * pown(50,2) + params->bmi_multipliers[originNew * 4 + 3] * pown(50,3);
}else {
oddBMI = params->bmi_multipliers[originNew * 4] + params->bmi_multipliers[originNew * 4 + 1] * new_bmi + params->bmi_multipliers[originNew * 4 + 2] * pown(new_bmi,2) + params->bmi_multipliers[originNew * 4 + 3] * pown(new_bmi,3);
Expand Down

0 comments on commit 82186a8

Please sign in to comment.