pharmaverse / admiralpeds

Admiral Package Extension for Pediatric Clinical Trials
https://pharmaverse.github.io/admiralpeds/
Apache License 2.0
13 stars 3 forks source link

Closes #55 Percentiles for age were being miscalculated #56

Closed zdz2101 closed 4 months ago

zdz2101 commented 4 months ago

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

github-actions[bot] commented 4 months ago

Code Coverage

Package Line Rate Health
admiralpeds 69%
Summary 69% (88 / 128)
zdz2101 commented 4 months ago

image

image

@rossfarrugia Just to point it out, the patient with abnormally low head circumference even a sanity check with the WHO excel makes sense too, data prior to their "428 days old" ~14 month old visit, you see their HC from the 359-407 visits is well below 40, as we can see on the WHO's HC for age chart, even the P01 percentile indicates for that age ~12-13 months old, the P01 percentile is 40.7-41

rossfarrugia commented 4 months ago

@Fanny-Gautier @Lina2689 would you have chance to sanity check this update and test run it with your template to see all looks good? FYI @Minlei0201 too as your issue is the unit tests for this one.

Fanny-Gautier commented 4 months ago

@Fanny-Gautier @Lina2689 would you have chance to sanity check this update and test run it with your template to see all looks good?

I'll try to find some times tomorrow. thanks

rossfarrugia commented 4 months ago

@zdz2101 does this PR resolve the following issue @Minlei0201 sent by email?

During the testing, I noticed the set_values_to_pctl parameter derivation in the derive_params_growth_age function is incorrect - it still derives SDS instead of the percentile.

Fanny-Gautier commented 4 months ago

@zdz2101 does this PR resolve the following issue @Minlei0201 sent by email?

During the testing, I noticed the set_values_to_pctl parameter derivation in the derive_params_growth_age function is incorrect - it still derives SDS instead of the percentile.

I think so, I can see the following difference:

zdz2101 commented 4 months ago

@zdz2101 does this PR resolve the following issue @Minlei0201 sent by email?

During the testing, I noticed the set_values_to_pctl parameter derivation in the derive_params_growth_age function is incorrect - it still derives SDS instead of the percentile.

I think so, I can see the following difference:

  • Before :

image

  • After:

image

Yes the pctl's should all be correctly calculated here now