Skip to content

Adding multi-comparator functionality lyt fun#271

Open
gmbecker wants to merge 5 commits intodevfrom
multicomp_lyt_fun
Open

Adding multi-comparator functionality lyt fun#271
gmbecker wants to merge 5 commits intodevfrom
multicomp_lyt_fun

Conversation

@gmbecker
Copy link
Copy Markdown
Collaborator

@gmbecker gmbecker commented Apr 15, 2026

Not intended for immediate merge, but for team to look through and review approach, with merge after discussions.

Checks

  • (Have you updated the NEWS.md ?)

@gmbecker gmbecker requested review from eanokian, iaugusty, jkovach2 and munoztd0 and removed request for eanokian and munoztd0 April 15, 2026 22:49
@munoztd0 munoztd0 changed the base branch from main to dev April 16, 2026 09:25
@munoztd0 munoztd0 marked this pull request as draft April 16, 2026 09:25
@munoztd0 munoztd0 marked this pull request as ready for review April 16, 2026 09:25
@munoztd0 munoztd0 changed the title Multicomp lyt fun Adding multi-comparator functionality lyt fun Apr 16, 2026
@munoztd0 munoztd0 force-pushed the multicomp_lyt_fun branch from e6723cd to 3c2e245 Compare April 16, 2026 14:34
@munoztd0 munoztd0 mentioned this pull request Apr 16, 2026
35 tasks
Comment thread R/risk_diff_col_struct.R
}

lvls_to_keep <- levels_from_comp_map(comp_map, fulldf, ref_lvls, comp_vars, combo_map)
restrict_facets(lvls_to_keep, op = "keep")(ret, spl, fulldf)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmbecker where is this function defined? I get
Error applying custom split function: could not find function "restrict_facets"
when running tests

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I forgot to update the description file. Its in rtables in aPR that I had thought was merged in but it wasn't. should be soon: insightsengineering/rtables#1081

Comment thread R/risk_diff_col_struct.R Outdated
Comment thread R/risk_diff_col_struct.R Outdated
}

ctrl_span <- unique(colspan_trt_map[[spanvar]])[2] ## assume second is non-active
ctrl_vals <- colspan_trt_map[colspan_trt_map[[spanvar]] == ctrl_span, trtvar]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it take into account that less control groups can be requested via comp_map? Eg only against Pbo?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, I think this is better interpreted as "possible control groups", if a comp_map is specified, that will be used when constructing the actual risk difference columns.

I agree we need a test to confirm this though, and if it is causing levels to show up where they shouldn't we'll need to fix it.

@gmbecker
Copy link
Copy Markdown
Collaborator Author

@iaugusty @munoztd0 @jkovach2 @eanokian reworked as discussed and ready for another look through

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.

3 participants