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

Derive AVALC, AVAL and AVALU #83

Closed
wants to merge 4 commits into from
Closed

Conversation

thomas-neitmann
Copy link
Contributor

Close #62

@bundfussr
Copy link
Collaborator

At first glance the derive_aval function looks fine. But at second glance I wonder if it is really helpful.

  • The name suggests that it is a general function for deriving aval. But I think it can be used for advs and adeg only. Maybe also for some parameters in adlb and questionnaires datasets.
  • The function derives the avalu variable which is Roche specific. CDISC ADaMIG suggests that the unit should be stored in param:

    Note that there is no separate units variable for BDS variables PARAM or AVAL, since the units of AVAL will be included in the value of PARAM.

  • To support review and avoid black boxes you would need to add a comment before the derive_aval call like

    # derive AVAL, AVALC, and AVALU as VSSTRESN, VSSTRESC, and VSSTRESU respectively

So maybe it is better not implementing a function but just using mutate(AVAL = VSSTRESN, AVALC = VSSTRESC, AVALU = VSSTRESU).

What do you think?

@thomas-neitmann
Copy link
Contributor Author

@aehmann-gsk I'd be interested to hear your thoughts on this.

@aehmann-gsk
Copy link
Contributor

aehmann-gsk commented Apr 15, 2021

@thomas-neitmann @bundfussr
I am ok with AVALU, we do have that defined in TA specific specs so it could be useful. I do have a concern the function will abort if all 3 (--stresc, --stresn, and --stresu are not present. This could limit the use of the function significantly because for questionnaires or anything that is not continuous, the --stresn and/or --stresu may not be present.

It may be more useful to have the function call be:
derive_aval <- function(dataset, AVALC = STRESC, AVAL = STRESN, AVALU = STRESU) {
and also allow for these items to be missing if they are not applicable. One last note, may want to think about situations where the AVAL/AVALC may not come from a findings domain - perhaps that is more ADaM specific and does not need to be addressed with this function, just something to think about.

@thomas-neitmann
Copy link
Contributor Author

After giving it some more thought I agree with @bundfussr and would suggest that user would simply use mutate() to do the applicable mapping "manually".

@bms63 bms63 deleted the 62_derive_aval branch November 15, 2021 21:03
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
Merge branch '83_document_reexporting_and_why@devel' of https://github.com/pharmaverse/admiraldev into 83_document_reexporting_and_why@devel

# Conflicts:
#	R/reexports.R
#	man/reexports.Rd
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
ProfessorP-beep pushed a commit that referenced this pull request May 14, 2024
…why@devel

Close #83 document reexporting and why@devel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

program function to derive AVAL, AVALC and AVALU
3 participants