Repository navigation
Conversation
diff_ci_3d statistic to estimate_proportion_diff()diff_ci_3d statistic to s_proportion_diff()
diff_ci_3d statistic to s_proportion_diff()diff_est_ci statistic to s_proportion_diff()
munoztd0
left a comment
There was a problem hiding this comment.
minor change but overall lgtm
|
@Melkiades , @shajoezhu - can you pl. have a look at this PR and possible merge it if you have no any objections? Thank you! |
|
@munoztd0 , can you share the scda.test test results? PR link here? @wwojciech can you resolve the conflict? |
|
@vikram-rawat - can you resolve conflicts please? I unfortunately have no permissions to do that. Thanks! |
|
@wwojciech @gmbecker , could you give me a list of members that i will add you to the team for access. thanks |
Thank you @shajoezhu - I will check this with the team and will get back to you. In the meanwhile, for sure you can grant me an access. Thanks! |
48a82cd to
f13fdb1
Compare
OFC, -> here it is -> insightsengineering/scda.test#251 |
@gmbecker @wwojciech @vikram-rawat @iaugusty @eanokian @rmao6 @y-runthla and @danielinteractive @gm-gi-ext |
Signed-off-by: Wojtek <11532997+wwojciech@users.noreply.github.com>
More nicer implementation of the label. Signed-off-by: Wojtek <11532997+wwojciech@users.noreply.github.com>
Update return description in man. Signed-off-by: Wojtek <11532997+wwojciech@users.noreply.github.com>
…to NEWS Co-authored-by: Codex <noreply@openai.com>
Melkiades
left a comment
There was a problem hiding this comment.
Approving. Two small things I pushed straight to the branch rather than send you round again:
tern_default_labels[["diff_est_ci"]]hardcoded"... and 95% CI".get_labels_from_stats()is exported and returns that value, so it was wrong for any otherconf_level. Now conf-level agnostic; the label attribute froms_proportion_diff()still carries the actual level, so rendered output is unchanged.- NEWS entry now carries
(#1523), matching its neighbours.
Checked after the change: default table output identical, diff_est_ci renders correctly at both 95% and 90%, test-prop_diff.R 89 passed and 0 failed.
One thing I deliberately left alone: .indent_mods lists diff_est_ci but .formats does not. "xx.x (xx.x, xx.x)" is not a built-in formatters spec, the built-in 3d ones use " - " rather than ", ", so it needs format_xx(), and putting a function into that vector would turn .formats into a list. The default lookup in tern_default_formats already resolves it, so the asymmetry is harmless.
Nice addition, the single-row rendering is genuinely useful.
Feature description
s_proportion_diff() currently returns diff and diff_ci as
separate elements. This means the risk difference and its CI always
render as two table rows.
A combined 3-element vector diff_est_ci = c(diff, lower_ci, upper_ci)
would allow rendering them on a single row (e.g., -7.3 (-26.7, 12.2)).
This pattern already exists in tern — s_surv_timepoint() returns
rate_diff_ci_3d for the same purpose.
Fixes - #1523