-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
335 differential precision (chevron) #343
Conversation
R/lbt01.R
Outdated
n_fmt <- "xx" | ||
mean_sd_fmt <- sprintf("xx%s (xx%s)", xn, xn) | ||
median_fmt <- sprintf("xx%s", xn) | ||
min_max_fmt <- "xx.x - xx.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for min_max format, I think we usually have one decimal points less than the mean/sd precision, e.g. for mean/sd we have xx.xx, for min-max, we have xx.x. What do you think @barnett11 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I agree thanks @clarkliming -
3.1. Measures of location and dispersion (e.g., mean, median, variance, SD, SE, and corresponding confidence intervals) are displayed with 1 more decimal place of precision than the most precise collected data.
3.2. Percentiles (eg, Q1, Q3, 99th percentile) are displayed with 1 more decimal place of precision than the most precise collected data.
3.3. When data are summarized in the same unit as collected, the minimum and the maximum are displayed with the same number of decimal places of precision as the most precise collected data.
@@ -94,7 +103,50 @@ lbt01_1_lyt <- function(armvar, | |||
varlabels = summaryvars_lbls, | |||
nested = TRUE | |||
) %>% | |||
summarize_colvars() %>% | |||
analyze_colvars( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may need to abstract this function into tern some time later so that other templates can also use this
@barnett11 could you please help review this output, where change from baseline for baseline is cleaned up, and precisions are supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am getting some odd results,
Precision of 2 - is that for the stats or the incoming value? So if I select 2, I should see mean to 3dp? And Min-Max to 2? Am not seeing it currently
Also issue if set to 0 dp,
The Min-Max is causing warnings
Should precision values be based on PARAMCD
as easier to write?
I agree that we can use |
New changes;
thank you for your review |
🧪 Code Coverage Summary
Results for commit: c60c4208a9da4f5448009825abbbf9a3ab2ab493 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
I think this output looks great. @barnett11 can you have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is a common issue, and we can open new issues to track that. What do you think about this issue @shajoezhu ? |
This is looking really great thanks @BFalquet and @clarkliming . An observation and a suggestion, Suggestion: |
I've just realised this is due to the different nature of roundings between R and SAS - do we have/want a convention for this? |
yes SAS and R have different conventions of rounding, R uses bankers rounding while SAS does not. This bankers rounding is selected as standard, see IEEE 754; I think we should not change this |
Signed-off-by: Liming <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge this for now, and open new issues of test; in addition, the spotted issue of rounding and NA when 0 records available can be tracked in other issue
I think this will be common, perhaps we can create improve this in tern functions, seems like a formatting issue? |
…on@main' into 335-differential-precision-chevron@main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precision approach works well and looks good - issues identified have been passed to other issues thanks @BFalquet
close #335
This is a proof of concept applied to lbt01
thank you for your suggestions