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

Documentation: Increase unit-test coverage for derive_params_growth_age() #51

Closed
zdz2101 opened this issue Jun 11, 2024 · 1 comment · Fixed by #67
Closed

Documentation: Increase unit-test coverage for derive_params_growth_age() #51

zdz2101 opened this issue Jun 11, 2024 · 1 comment · Fixed by #67
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@zdz2101
Copy link
Collaborator

zdz2101 commented Jun 11, 2024

Please select a category the issue is focused on?

Other

Let us know where something needs a refresh or put your idea here!

Create unit tests for derive_params_growth_height() using the pre-existing CDC/WHO metadata, be sure to include:

  • tests for age-for-weight, age-for-height, age-for-bmi, age-for-head circumference
  • test for extremely high/low values of each in the above
  • for expected >= 95%-tile BMI, that the adjustment is properly made
@zdz2101 zdz2101 added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 11, 2024
@rossfarrugia
Copy link
Collaborator

@Minlei0201 i sent you an invite to join the admiralpeds dev team on GH so that you get write access to this repo. Once you have it then you can assign yourself to this issue. Please work on this with the target of having the PR reviewed and merged by end of the month as discussed last meet.

@Minlei0201 Minlei0201 self-assigned this Jun 23, 2024
rossfarrugia added a commit that referenced this issue Jul 18, 2024
Merge branch 'main' into 51-documentation-increase-unit-test-coverage-for-derive_params_growth_age

# Conflicts:
#	R/derive_params_growth_height.R
#	inst/templates/ad_advs.R
#	man/derive_params_growth_height.Rd
#	tests/testthat/test-derive_params_growth_height.R
#	vignettes/advs.Rmd
rossfarrugia added a commit that referenced this issue Jul 25, 2024
…erage for derive params growth age (#67)

* Add unit testing for weight, height, and BMI for age derivation

* Update unit tests to include test cases:
a). for patients<2 years old, and age in months;
b). to test extreme values handling for BMI

* Include dplyr library call

* Update styler

* Add test for out of bound age, and test for missing anthropometric values

* Update derive_params_growth_age to include byvar parameter; add STUDYID and VISIT to test data

* Update styler

* Add tests for byvar; use dplyr::inner_join instead of inner_join

* Revise percentile (multiply by 100)

* Update age unit to be in days for the majority of tests; add test cases for age in months

* styler update

* incorrect placement of /100

* add empty metadata to test 6 and 7

* styler/lintr

* styler/lintr

* implementation of the rightskew

* undo last edit

* styler/lintr

* implemented

* devtools doc

* styler spelling

* add extended bmi case of really high 8.21

* add who_correction to all weight references

* turned off for dummy example

* turned off in dummy metadata cases

* fixes for my review comments and extra vignette explanation for WHO correction

* lintr fix

* Ensure the correct directionality

* use cli messaging

* need temporary variables incase AVAL used for `analysis_var`

* applies for hieght too

* reword right skew

* #74 update wording of WHO correction in vignette as was done in the function

* #74 apply who adjustment only where who metadata being used

* fix CI break after git merge main

* Closes #77 correctly add in NA records of unmatched records (#78)

* correctly add in NA records of unmatched records

* #77 remove redundant P95 and Sigma from metadata as not relevant to test

---------

Co-authored-by: Ross Farrugia <[email protected]>

---------

Co-authored-by: Minlei Liao <[email protected]>
Co-authored-by: Ross Farrugia <[email protected]>
Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ross Farrugia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Done
3 participants