Skip to content

Commit e005dbb

Browse files
authored
Merge pull request #122 from Merck/Issue120_add_bisection_argument_for_prepare_ae_forestly
Check-in - Add 'bisection' argument to 'prepare_ae_forestly' per Issu…
2 parents 883cc6a + 8fff915 commit e005dbb

2 files changed

Lines changed: 32 additions & 5 deletions

File tree

R/prepare_ae_forestly.R

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,24 @@
1919
#' Prepare datasets for interactive forest plot
2020
#'
2121
#' @inheritParams metalite.ae::prepare_ae_specific
22+
#' @param meta A metadata object created by metalite.
23+
#' @param population A character value of population term name.
24+
#' The term name is used as key to link information.
25+
#' @param observation A character value of observation term name.
26+
#' The term name is used as key to link information.
27+
#' @param parameter A character value of parameter term name.
28+
#' The term name is used as key to link information.
29+
#' @param components A character vector of components name, default value is `"par"`.
30+
#' @param reference_group An integer to indicate reference group.
31+
#' Default is 2 if there are 2 groups, otherwise, the default is 1.
2232
#' @param ae_listing_display A vector of name of variables used to display
2333
#' on AE listing table.
2434
#' @param ae_listing_unique A logical value to display only unique records
2535
#' on AE listing table.
26-
#'
36+
#' @param bisection A numeric value. A control parameter for the bisection
37+
#' method used to calculate confidence the lower and upper confidence
38+
#' interval bounds for the risk. The default value is `1e2`.
39+
#' @param ... Additional arguments passed to [metalite.ae::rate_compare_sum()].
2740
#' @return An `outdata` object.
2841
#'
2942
#' @export
@@ -47,7 +60,10 @@ prepare_ae_forestly <- function(
4760
"USUBJID", "SITEID", "SEX", "RACE", "AGE", "ASTDY", "AESER",
4861
"AEREL", "AEACN", "AEOUT", "ADURN", "ADURU"
4962
),
50-
ae_listing_unique = FALSE) {
63+
ae_listing_unique = FALSE,
64+
bisection = 1e2,
65+
...
66+
) {
5167
if (is.null(population)) {
5268
if (length(meta$population) == 1) {
5369
population <- meta$population[[1]]$name
@@ -121,7 +137,10 @@ prepare_ae_forestly <- function(
121137
components = components,
122138
reference_group = reference_group
123139
) |>
124-
metalite.ae::extend_ae_specific_inference() |>
140+
metalite.ae::extend_ae_specific_inference(
141+
bisection = bisection,
142+
...
143+
) |>
125144
collect_ae_listing(display = ae_listing_display) |>
126145
format_ae_listing(display_unique_records = ae_listing_unique)
127146
})

man/prepare_ae_forestly.Rd

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)