When reviewing {cdcanthro} and {whoanthro} what could we re-use and where should we make adaptations for {admiralpeds}? #5
Replies: 9 comments 11 replies
-
Idea from team call: standardize the input/output of functions |
Beta Was this translation helpful? Give feedback.
-
Thoughts from the package WHOanthroGeneral thoughts
Instead of: Apply the conversion automatically within the package. The user will choose from months and days (days would be the default value)
For example, waz: weight-for-sex/age z-score we can add labels for the columns using labelled package
why is this a must ? I thought that age and sex only were necessary. what is nice to keep?
However, I am afraid that 1 and 2 encodings might be misinterpreted
what to refactor?:
I think these would be converted to tidyverse conventions
It has the validation, filtering and joining. I think this will be refactored to use tidyverse and Adam Please let me know if any of these suggestions make sense |
Beta Was this translation helpful? Give feedback.
-
Mahmoud (@santarabantoosoo), I agree that the 0/1 and 1/2 coding for sex could be confusing. The whoanthro program contains this because a pediatrician, who was new at R, asked me to include both codings so she wouldn't have to change her programs. A user even asked me to let the 'sex' variable be named 'sex_code' and (I think) I accommodated this request. I'm a pushover. About the required columns: These functions calculate z-scores and percentiles for weight, length, etc, relative to a standard (CDC or WHO) population. If only sex and age are in the input dataset, none of the z-scores can be calculated - they will all be NA. There could easily be some rows that are missing weight, height, or head circumference - the calculated z-scores and percentiles will be NA. But if the entire data frame contains only values for sex and age, there's no point in using whoanthro. That's what the clumsily worded phrase "need to have all variables in data; agedays, wt, lenhei, headc, and bmi" means. |
Beta Was this translation helpful? Give feedback.
-
A few comments to start this review. Other comments will be added.
|
Beta Was this translation helpful? Give feedback.
-
Piere, About 'who_ref_data' - it's just the various WHO reference datasets
made into 1 'complete' dataset - the columns are the LMS values for wt, ht,
headcirc, bmi, etc. Boys and girls are rbinded together
set_col_first reorders column names and I think it comes from the hutils
package,
.c() is to get rid of having to put variable names in quotation marks; I
think this is the 'Cs' function in the Hmisc package.
I'm not surprised that I have functions (fnames and fdel) that are not used
anywhere
david
…On Thu, Mar 14, 2024 at 7:07 AM Pierre-Wallet ***@***.***> wrote:
A few comments to start this review. Other comments will be added.
- .c() seems to be used to convert a vector of objects into a vector
of characters. Maybe use as.character(alist(...)) instead, easier to read.
Or maybe dplyr style will make it useless.
- fnames() and fdel() are not used anywhere.
- set_col_first seems to be used to reorder columns. Again, to see if
it is worth to keep it with {dplyr} style
- Where does who_ref_data dataset come from? Is it playing the role of
the metadataset that we just created from WHO and CDC websites?
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY2XGPW4FRIXJRC5YY22DHDYYGAHJAVCNFSM6AAAAABDEQCPPKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DOOBUHAYTM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It may be time to revisit this discussion once again, and begin thinking about how we want to design our functions in a way that are user-friendly/the "admiral" way with some of the above thoughts take into consideration The repo that @ngiangre shared in the slack can certainly provide some inspiration: https://lshtm-gigs.github.io/gigs/index.html I am still gathering/looking through myself and will have thoughts on this matter soon |
Beta Was this translation helpful? Give feedback.
-
Sounds great, thank you!
Cheers,
Nick Giangreco, PhD
nickg.bio
…On Mon, Apr 8, 2024 at 7:20 AM Ross Farrugia ***@***.***> wrote:
yes absolutely, hoping @zdz2101 <https://github.com/zdz2101> can share
with us a first draft of the initial outline for our ADVS with the growth
development parameters, and from there we all can review and consider
whether we see any different inputs/outputs/functions/arguments needed.
always easier if someone from admiral core dev team does this first as they
know the admiral dev principles best.
—
Reply to this email directly, view it on GitHub
<#5 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3TDS4MFJJPPCXCOU23R4DY4J4Q3AVCNFSM6AAAAABDEQCPPKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANBUHAYTS>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you David, I totally agree! I screenshotted directly from the README
of {gigs}
Cheers,
Nick Giangreco, PhD
nickg.bio
…On Mon, Apr 8, 2024 at 8:29 AM David Freedman ***@***.***> wrote:
My 2 cents: I think it is the wrong approach to have a user type in values
for 1 person and then to get a z-score back. As a user of the function and
based on talks with other users, > 99% of the time, people are going to
want to feed a dataset / dataframe to the function and get back the same
dataset with some additional columns for z-scores and percentiles. If you
do want something like what is shown in the screenshot, the user could make
a 1-row dataframe and feed it to the function.
In my 20 years at CDC using and maintaining the CDC and WHO functions, I
never had a user ask us for a function that works like the one in the
screenshot. Everyone was happy to feed a dataset to the function and get
back the dataset with additional columns for the z-scores and percentile.
—
Reply to this email directly, view it on GitHub
<#5 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3TDS5JQILFFCV6C5OCOCDY4KETRAVCNFSM6AAAAABDEQCPPKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANBVGU3DQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Closing out this discussion now and we should take the above considerations into effect when developing the admiralpeds functions, but also we have the benefit of using David's packages as essentially a QC check to verify consistency of our results. |
Beta Was this translation helpful? Give feedback.
-
Links: https://github.com/CDC-DNPAO/CDCAnthro & https://github.com/CDC-DNPAO/WHOanthro
Examples to consider:
Beta Was this translation helpful? Give feedback.
All reactions