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

default precisions for s_summary.numeric #979

Closed
clarkliming opened this issue Jun 21, 2023 · 7 comments
Closed

default precisions for s_summary.numeric #979

clarkliming opened this issue Jun 21, 2023 · 7 comments
Assignees

Comments

@clarkliming
Copy link
Contributor

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.

Originally posted by @barnett11 in insightsengineering/chevron#343 (comment)

@clarkliming
Copy link
Contributor Author

currently we have inconsistent which I believe could be refined.

> tern:::.a_summary_numeric_formats
                   n                  sum                 mean 
               "xx."               "xx.x"               "xx.x" 
                  sd                   se              mean_sd 
              "xx.x"               "xx.x"        "xx.x (xx.x)" 
             mean_se              mean_ci             mean_sei 
       "xx.x (xx.x)"     "(xx.xx, xx.xx)"     "(xx.xx, xx.xx)" 
            mean_sdi            mean_pval               median 
    "(xx.xx, xx.xx)"              "xx.xx"               "xx.x" 
                 mad            median_ci            quantiles 
              "xx.x"     "(xx.xx, xx.xx)"        "xx.x - xx.x" 
                 iqr                range                   cv 
              "xx.x"        "xx.x - xx.x"               "xx.x" 
                 min                  max         median_range 
              "xx.x"               "xx.x" "xx.x (xx.x - xx.x)" 
           geom_mean              geom_cv 
              "xx.x"               "xx.x" 

if range has 1 dp, then mean should have 2 dp

@shajoezhu
Copy link
Contributor

hey @khatril , what do you think? I have no strong preference here. perhaps we should also consider, set them as the most commonly used?

@Melkiades
Copy link
Contributor

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.

Originally posted by @barnett11 in insightsengineering/chevron#343 (comment)

If this is the standard we can change the internal standard in tern to reflect that. We need only to be certain that there is alignment in what the new standards should be

@telepath37
Copy link

For 3.3 in the original issue, and specifically looking at variable such as STUDY DAY, does 3.3 suggest we should show min-max in its original precision, i.e. whole number?

@anajens
Copy link
Contributor

anajens commented Aug 24, 2023

For reference, GDSR update from March 2023 includes the following details on number of decimal places:

https://github.com/insightsengineering/sme-tasks/issues/639

@clarkliming

This comment was marked as resolved.

@Melkiades Melkiades self-assigned this Sep 5, 2023
@Melkiades
Copy link
Contributor

Possible to achieve this now by doing .formats = "auto" from analyze_vars()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants