-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add ard_event_rates()
#244
base: main
Are you sure you want to change the base?
Conversation
Unit Tests Summary 1 files 163 suites 1m 7s ⏱️ Results for commit c023a1a. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit aadbd6f ♻️ This comment has been updated with latest results. |
Code Coverage Summary
Diff against main
Results for commit: c023a1a Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Thanks @edelarua ! Can you help me understand the differences between this and the hierarchical function? Also, when we refer to ordered, does that mean ordered factors? |
This performs similarly to the hierarchical function but doesn't use hierarchies, so calculates event rates for flat tables. The For example, the grade rows in this table could be calculated with Honestly, we could probably simplify the hierarchical functions by implementing this upstream in |
Hmmm, before we merge this in, can we brainstorm together a bit? Either today or next week? |
Would another way to calculate these quantities be: ADAE |>
dplyr::slice_max(AESEV, n = 1, with_ties = FALSE, by = USUBJID) |>
cards::ard_categorical(
by = TRTA,
variables = AESEV,
denominator = ADSL |> dplyr::select(USUBJID, TRTA = ARM)
) |
What changes are proposed in this pull request?
ard_event_rates()
to calculate event rates. (Add ARD function for counting patients #240)Closes #240
Pre-review Checklist (if item does not apply, mark is as complete)
usethis::pr_merge_main()
ard_*()
function was added, it passes the ARD structural checks fromcards::check_ard_structure()
.ard_*()
function was added,set_cli_abort_call()
has been set.ard_*()
function was added and it depends on another package (such as,broom
),is_pkg_installed("broom")
has been set in the function call and the following added to the roxygen comments:@examplesIf do.call(asNamespace("cardx")$is_pkg_installed, list(pkg = "broom""))
devtools::test_coverage()
Reviewer Checklist (if item does not apply, mark is as complete)
devtools::test_coverage()
When the branch is ready to be merged:
NEWS.md
with the changes from this pull request under the heading "# cardx (development version)
". If there is an issue associated with the pull request, reference it in parentheses at the end update (seeNEWS.md
for examples).