You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in aet01_aesi.md, the toxicity grade variable (ATOXGR) needs to be reformatted sometimes, as it may contain some empty string. However, explicit na levels are displayed in the analysis, while they should not. However, they should still be included in the calculation of n.
=> clean up the code in the tables using ATOXGR. Check what is the value that will be incorporated in the denominator but not displayed ("<Missing>" will be displayed and we don't want that) and update the preprocessing function accordingly. There might be an argument in rtables, otherwise, perform some strategic reformatting. (reformat then droplevel or something like that)
Author
@clarkliming clarkliming 28 minutes ago
this is a difficult issue. We can expect Missing grade in adae.atoxgr, (even in cleaned adam). We should not filter this out because we also need to count the number of events. But this should not be counted in the count_occurrences_by_grade.
Author
@clarkliming clarkliming 24 minutes ago
ok. for ATOXGR, those records are still using NA (not convertet to a level) and then will be discarded.
Author
@clarkliming clarkliming 10 minutes ago
another update: ADAE.ATOXGR is a string (character in R's language). in rtables we require ATOXGR to be factor. Then we need to convert it into factor.
so here while we apply reformating, we need to populate NA for empty strings. Very different logic here!
reformat(c('1','2','3','4','5',''), rule('1'='1','2'='2','3'='3','4'='4','5'='5'))
my suggestion is to keep this missing level for now (as this solves many issues) and open another issue to deal with this.
The text was updated successfully, but these errors were encountered:
BFalquet
changed the title
another update: ADAE.ATOXGR is a string (character in R's language). in rtables we require ATOXGR to be factor. Then we need to convert it into factor.
ADAE.ATOXGR reformatting
Apr 25, 2023
the logic behind is different. in general, we convert all "NA" and "" to meaningful labels "" for all variables, but for this variable we can't do it because finding the maximum will lead to issues. Other ae tables related to highest grade will also have similar issue. Let's keep this open and merge that PR (where ATOXGR is convereted back to contain NA values)
[tests/testthat/_snaps/aet01_aesi.md]
in aet01_aesi.md, the toxicity grade variable (ATOXGR) needs to be reformatted sometimes, as it may contain some empty string. However, explicit na levels are displayed in the analysis, while they should not. However, they should still be included in the calculation of
n
.=> clean up the code in the tables using ATOXGR. Check what is the value that will be incorporated in the denominator but not displayed ("
<Missing>
" will be displayed and we don't want that) and update the preprocessing function accordingly. There might be an argument in rtables, otherwise, perform some strategic reformatting. (reformat then droplevel or something like that)For more details, see the discussion:
(https://github.com/insightsengineering/chevron/pull/491/files/a50d2394516330e91f767530bc20be8ef03e4cfd..811ce7114223b915733330f3265a167d743928d4#diff-ed60798806211a83e237e7f8abb0cbc52d4d9bb9bfdddb3e9e5b65ac1222f426)
@@ -13,7 +13,8 @@
Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%)
Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%)
Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%)
Grade 5 (fatal outcome) 76 (56.7%) 70 (52.2%) 75 (56.8%)
Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%)
Missing 0 0 0
@BFalquet BFalquet 46 minutes ago
Not sure if missing should appear (I dont think so). What do you think @barnett11
Author
@clarkliming clarkliming 28 minutes ago
this is a difficult issue. We can expect Missing grade in adae.atoxgr, (even in cleaned adam). We should not filter this out because we also need to count the number of events. But this should not be counted in the count_occurrences_by_grade.
Author
@clarkliming clarkliming 24 minutes ago
ok. for ATOXGR, those records are still using NA (not convertet to a level) and then will be discarded.
Author
@clarkliming clarkliming 10 minutes ago
another update: ADAE.ATOXGR is a string (character in R's language). in rtables we require ATOXGR to be factor. Then we need to convert it into factor.
so here while we apply reformating, we need to populate NA for empty strings. Very different logic here!
reformat(c('1','2','3','4','5',''), rule('1'='1','2'='2','3'='3','4'='4','5'='5'))
my suggestion is to keep this missing level for now (as this solves many issues) and open another issue to deal with this.
The text was updated successfully, but these errors were encountered: