DMT01
Table 1 (Default) Demographics and Baseline Characteristics Table 1.
dmt01_1.Rd
For each variable, summary statistics are
by default based on the number of patients in the corresponding n
row.
Usage
dmt01_1_main(
adam_db,
armvar = .study$planarm,
summaryvars = .study$demo_vars,
summaryvars_lbls = .study$demo_vars_lbls,
lbl_overall = .study$lbl_overall,
prune_0 = TRUE,
deco = std_deco("DMT01"),
.study = list(planarm = "ARM", demo_vars = c("AGE", "SEX", "COUNTRY", "RACE"),
demo_vars_lbls = NULL, lbl_overall = "All Patients")
)
dmt01_1_lyt(
armvar = .study$planarm,
summaryvars = .study$demo_vars,
summaryvars_lbls = .study$demo_vars_lbl,
lbl_overall = .study$lbl_overall,
deco = std_deco("DMT01"),
.study = list(planarm = "ARM", demo_vars = c("AAGE", "AGEGR1", "SEX", "ETHNIC",
"RACE"), demo_vars_lbl = c("Age (yr)", "Pooled Age Group 1 (yr)", "SEX", "ETHNIC",
"RACE"), lbl_overall = "All Patients")
)
dmt01_1_pre(adam_db, ...)
dmt01_1
Arguments
- adam_db
(
dm
) object containing theADaM
datasets- armvar
(
character
) variable used for column splitting- summaryvars
(
vector of character
) variables summarized in demographic table. Usually a vector containing the following one or more of the following:AAGE
,AGEGR1
,SEX
,ETHNIC
,RACE
and by default all of them.- summaryvars_lbls
(
vector of character
) labels corresponding to the analyzed variables.- lbl_overall
(
character
) label used for overall column, if set toNULL
the overall column is omitted- prune_0
(
logical
) remove 0 count rows- deco
(
character
) decoration withtitle
,subtitles
andmain_footer
content- .study
(
list
) with default values for the arguments of the function- ...
not used.
- demo_vars
(
vector of strings
) variables summarized in demographic table.- demo_vars_lbls
(
vector of strings
) labels corresponding to the analyzed variables.
Details
Information from
ADSUB
are generally included intoADSL
before analysis.Default demographic and characteristics table
If not specified otherwise, numbers represent absolute numbers of patients and fraction of
N
Remove zero-count rows
Split columns by arm (planned or actual / code or description)
Include a total column by default
Examples
library(dm)
library(magrittr)
db <- syn_test_data() %>%
dmt01_1_pre()
dmt01_1_main(db, summaryvars = c("AGE", "RACE", "SEX"), lbl_overall = NULL)
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ————————————————————————————————————————————————————————————————————————————————————————
#> Age
#> n 134 134 132
#> Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7)
#> Median 33.0 35.0 35.0
#> Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0
#> Race
#> n 134 134 132
#> ASIAN 68 (50.7%) 67 (50%) 73 (55.3%)
#> BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%)
#> WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%)
#> AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%)
#> MULTIPLE 0 1 (0.7%) 0
#> NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0
#> Sex
#> n 134 134 132
#> Female 79 (59%) 82 (61.2%) 70 (53%)
#> Male 55 (41%) 52 (38.8%) 62 (47%)
dmt01_1_main(db,
summaryvars = c("AGE", "RACE", "SEX"),
summaryvars_lbls = c("Age (yr)", "Race", "Sex")
)
#> A: Drug X B: Placebo C: Combination All Patients
#> (N=134) (N=134) (N=132) (N=400)
#> ———————————————————————————————————————————————————————————————————————————————————————————————————————
#> Age (yr)
#> n 134 134 132 400
#> Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) 34.9 (7.4)
#> Median 33.0 35.0 35.0 34.0
#> Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 20.0 - 69.0
#> Race
#> n 134 134 132 400
#> ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) 208 (52%)
#> BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) 91 (22.8%)
#> WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) 74 (18.5%)
#> AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) 25 (6.2%)
#> MULTIPLE 0 1 (0.7%) 0 1 (0.2%)
#> NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 1 (0.2%)
#> Sex
#> n 134 134 132 400
#> Female 79 (59%) 82 (61.2%) 70 (53%) 231 (57.8%)
#> Male 55 (41%) 52 (38.8%) 62 (47%) 169 (42.2%)
dmt01_1_lyt(armvar = "ACTARM")
#> A Pre-data Table Layout
#>
#> Column-Split Structure:
#> ACTARM (lvls)
#> (all obs)
#>
#> Row-Split Structure:
#> DOMAIN (lvls) -> AAGE:AGEGR1:SEX:ETHNIC:RACE (** multivar analysis **)
#>
dmt01_1_pre(syn_test_data())
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `adsl`, `adae`, `adaette`, `adcm`, `addv`, … (15 total)
#> Columns: 847
#> Primary keys: 2
#> Foreign keys: 1