-
-
Notifications
You must be signed in to change notification settings - Fork 26
[821] Feature Request: Add weights option to ancova #1412
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
[821] Feature Request: Add weights option to ancova #1412
Conversation
✅ All contributors have signed the CLA |
Random example: adsl <- tern::tern_ex_adsl
adlb <- tern::tern_ex_adlb %>%
mutate(
CHG = if_else(AVISITN > 0, AVAL - BASE, NA_real_, NA_real_)
) %>%
filter(
PARAMCD == "ALT"
& AVISIT == "WEEK 5 DAY 36"
)
lyt <- basic_table(show_colcounts = TRUE) %>%
split_cols_by(
var = "ARM",
ref_group = "B: Placebo"
) %>%
split_rows_by(
var = "PARAMCD",
labels_var = "PARAM",
label_pos = "topleft",
split_label = "Parameter",
section_div = " "
) %>%
summarize_ancova(
vars = "CHG",
variables = list(
arm = "ARM",
covariates = c("BASE", "SEX", "ARM")
),
conf_level = 0.95,
var_labels = "",
show_labels = "hidden",
weights_emmeans = "proportional"
)
build_table(lyt, adlb, alt_counts_df = adsl) |
tracking downstream checks at insightsengineering/scda.test#192 |
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.
hi @yurovska , can you please fix the lintr issue.
i would like also suggest adding this example with an snapshot to the scda.test |
Fixed |
@shajoezhu See my comment within insightsengineering/scda.test#192 |
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.
lgtm! Thanks a lot @yurovska
Fixes #821