pharmaverse / admiralpeds

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

derive_params_growth_age - add interpolation #59

Closed rossfarrugia closed 2 months ago

rossfarrugia commented 3 months ago

Review comments so far from @CDC-DNPAO:

  1. derive_params_growth_age() should really do interpolation (as with {cdcanthro}) for the CDC age ranges in months when converted to days, as there's too much change that can happen in this time. The way the function is written currently, a child who is 1 day short of being 25.5 months of age is matched to the reference data for a child who is 24.5 months even though he/she is about 29 days away from this value. As part of this please check how you're converting agedays to agemonths, here's what I do: agemonths = floor(agedays/30.4375) + 0.5. FYI @Minlei0201 as this will require some unit tests for interpolation once @zdz2101 updates the function.

  2. Question: why is the default for the extended BMI scores in the CDC charts as FALSE?

rossfarrugia commented 3 months ago

@CDC-DNPAO the answer to 2 is I believe because we use this function for many different parameters and this option is only relevant when the user calls it for BMI. In our template which is the default way users use admiral (via admiral::use_ad_template("ADVS", package = "admiralpeds")), you'll see the default call is as follows for BMI:

image

And this is also explained in the vignette:

image

CDC-DNPAO commented 3 months ago

@rossfarrugia @zdz2101 Ross, are you really sure that the default for the BMI correction is TRUE. If you type ?derive_params_growth_age , you'll see that the default for bmi_cdc_correction is FALSE. I want to emphasize that the default should be TRUE. If desired, I can provide about 8 papers to show the problems with the original CDC charts and why we derived the 'extended' standard for the calculation of very high BMIs.

And if it's decided that some sort of interpolation for each day of age is desired, I can provide CSV files with this interpolation in a few hours.

rossfarrugia commented 3 months ago

@CDC-DNPAO it is not default in the function itself (as that function is used for all parameters - not only BMI - and this extra processing is only relevant for BMI). What I mean above is that it is default in the template - see https://github.com/pharmaverse/admiralpeds/blob/main/inst/templates/ad_advs.R (line 296). The way our users use admiral packages is to use our ADaM templates as a starting point as these show the recommended ways to use our functions to create the analysis dataset you need, and this is what the vignette describes.

In a nutshell, we absolutely tell users that the way to go is to use the extended standard for BMI, and if they choose not to there is also that option but thats on them.

rossfarrugia commented 3 months ago

@CDC-DNPAO yes please for the interpolation CSV files, please do share with me and Zelos 👍

zdz2101 commented 3 months ago

@rossfarrugia @CDC-DNPAO precisely, because the function is agnostic to which anthropologic measure it is calculating, the default was set to FALSE since we don't want that calculation being done on ht/wt/hc, and users should be aware, somewhere along the programming pipeline it should be made aware to use the BMI correction, which is when you toggle it to false and require the P95 and Sigma columns in the metadata