The template produces the subgroup analysis of best overall response graphic.
Arguments
- adam_db
(
list
ofdata.frames
) object containing theADaM
datasets- dataset
(
string
) the name of a table in theadam_db
object.- arm_var
(
string
) the arm variable name used for group splitting.- rsp_var
(
string
) the response variable name to flag whether each subject is a binary response or not.- subgroups
(
character
) the subgroups variable name to list baseline risk factors.- strata_var
(
character
) required if stratified analysis is performed.- stat_var
(
character
) the names of statistics to be reported intabulate_rsp_subgroups
.- ...
Further arguments passed to
g_forest
andextract_rsp_subgroups
(a wrapper forh_odds_ratio_subgroups_df
andh_proportion_subgroups_df
). For details, see the documentation intern
. Commonly used arguments includecol_symbol_size
,col
,vline
,groups_lists
,conf_level
,method
,label_all
, etc.
Value
the main function returns a grob
object.
a gTree
object.
the preprocessing function returns a list
of data.frame
.
Note
adam_db
object must contain the table specified bydataset
with"PARAMCD"
,"ARM"
,"AVALC"
, and the columns specified bysubgroups
which is denoted asc("SEX", "AGEGR1", "RACE")
by default.If the plot is too large to be rendered in the output, please provide
gp
,width_row_names
,width_columns
andwidth_forest
manually to make it fit. Seetern::g_forest
for more details.
Examples
library(dplyr)
library(dunlin)
proc_data <- log_filter(
syn_data,
PARAMCD == "BESRSPI" & ARM %in% c("A: Drug X", "B: Placebo"), "adrs"
)
run(fstg01, proc_data,
subgroups = c("SEX", "AGEGR1", "RACE"),
conf_level = 0.90, dataset = "adrs"
)
#> Warning: The `gp` argument of `g_forest()` is deprecated as of tern 0.9.3.
#> ℹ Please use the `ggtheme` argument instead.
#> ℹ `g_forest` is now generated as a `ggplot` object. Additional display settings
#> should be supplied via the `ggtheme` parameter.
#> ℹ The deprecated feature was likely used in the chevron package.
#> Please report the issue at
#> <https://github.com/insightsengineering/chevron/issues>.
#> Warning: The `draw` argument of `g_forest()` is deprecated as of tern 0.9.3.
#> ℹ `g_forest` now generates `ggplot` objects. This parameter has no effect.
#> ℹ The deprecated feature was likely used in the chevron package.
#> Please report the issue at
#> <https://github.com/insightsengineering/chevron/issues>.