Skip to contents

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,
  arm_var = "ARM",
  summaryvars = list(`Age (yr)` = "AAGE", `Age group (yr)` = "AGEGR1", Sex = "SEX",
    Ethnicity = "ETHNIC", Race = "RACE"),
  lbl_overall = "All Patients",
  deco = std_deco("DMT01"),
  ...
)

dmt01_1_lyt(arm_var, summaryvars, summaryvars_lbls, lbl_overall, deco)

dmt01_1_pre(adam_db, ...)

dmt01_1_post(tlg, prune_0 = TRUE, ...)

dmt01_1

Format

An object of class chevron_t of length 1.

Arguments

adam_db

(dm) object containing the ADaM datasets

arm_var

(string) variable used for column splitting

summaryvars

(list) variables summarized in demographic table. Names are used as subtitles. For values where no name is provided, the label attribute of the corresponding column in adsl table of adam_db is used.

lbl_overall

(string) label used for overall column, if set to NULL the overall column is omitted

deco

(character) decoration with title, subtitles and main_footer content

...

not used.

summaryvars_lbls

(character) labels corresponding to the analyzed variables.

tlg

(TableTree, Listing or ggplot) object typically produced by a main function.

prune_0

(flag) remove 0 count rows

Details

  • Information from ADSUB are generally included into ADSL 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

Functions

  • dmt01_1_main(): Main TLG function

  • dmt01_1_lyt(): Layout

  • dmt01_1_pre(): Preprocessing

  • dmt01_1_post(): Postprocessing

Note

  • adam_db object must contain an adsl table with the columns specified in summaryvars.

Examples

library(dm)
library(magrittr)

db <- syn_data %>%
  dmt01_1_pre()

dmt01_1_main(db, lbl_overall = NULL)
#>                                                A: Drug X    B: Placebo    C: Combination
#>                                                 (N=134)       (N=134)        (N=132)    
#> ————————————————————————————————————————————————————————————————————————————————————————
#> Age (yr)                                                                                
#>   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  
#> Age group (yr)                                                                          
#>   n                                               134           134            132      
#>   <65                                         134 (100%)    134 (100%)     131 (99.2%)  
#>   >=65                                             0             0           1 (0.8%)   
#> Sex                                                                                     
#>   n                                               134           134            132      
#>   F                                           79 (59.0%)    82 (61.2%)      70 (53.0%)  
#>   M                                           55 (41.0%)    52 (38.8%)      62 (47.0%)  
#> Ethnicity                                                                               
#>   n                                               134           134            132      
#>   NOT REPORTED                                 6 (4.5%)      10 (7.5%)      11 (8.3%)   
#>   HISPANIC OR LATINO                          15 (11.2%)    18 (13.4%)      15 (11.4%)  
#>   NOT HISPANIC OR LATINO                      104 (77.6%)   103 (76.9%)    101 (76.5%)  
#>   UNKNOWN                                      9 (6.7%)      3 (2.2%)        5 (3.8%)   
#> Race                                                                                    
#>   n                                               134           134            132      
#>   ASIAN                                       68 (50.7%)    67 (50.0%)      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.0%)      11 (8.2%)       6 (4.5%)   
#>   MULTIPLE                                         0         1 (0.7%)           0       
#>   NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER        0         1 (0.7%)           0       
#>   OTHER                                            0             0              0       
#>   UNKNOWN                                          0             0              0       
dmt01_1_main(db, summaryvars = c("Age" = "AGE", "Race" = "RACE", "Gender" = "SEX"))
#>                                                A: Drug X    B: Placebo    C: Combination   All Patients
#>                                                 (N=134)       (N=134)        (N=132)         (N=400)   
#> ———————————————————————————————————————————————————————————————————————————————————————————————————————
#> Age                                                                                                    
#>   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.0%)      73 (55.3%)     208 (52.0%) 
#>   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.0%)      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%)  
#>   OTHER                                            0             0              0               0      
#>   UNKNOWN                                          0             0              0               0      
#> Gender                                                                                                 
#>   n                                               134           134            132             400     
#>   F                                           79 (59.0%)    82 (61.2%)      70 (53.0%)     231 (57.8%) 
#>   M                                           55 (41.0%)    52 (38.8%)      62 (47.0%)     169 (42.2%) 
dmt01_1_pre(syn_data)
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `adsl`, `adab`, `adae`, `adaette`, `adcm`, … (19 total)
#> Columns: 1400
#> Primary keys: 1
#> Foreign keys: 18
run(dmt01_1, syn_data)
#>                                                  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 
#>   Age group (yr)                                                                                         
#>     n                                               134           134            132             400     
#>     <65                                         134 (100%)    134 (100%)     131 (99.2%)     399 (99.8%) 
#>     >=65                                             0             0           1 (0.8%)        1 (0.2%)  
#>   Sex                                                                                                    
#>     n                                               134           134            132             400     
#>     F                                           79 (59.0%)    82 (61.2%)      70 (53.0%)     231 (57.8%) 
#>     M                                           55 (41.0%)    52 (38.8%)      62 (47.0%)     169 (42.2%) 
#>   Ethnicity                                                                                              
#>     n                                               134           134            132             400     
#>     NOT REPORTED                                 6 (4.5%)      10 (7.5%)      11 (8.3%)       27 (6.8%)  
#>     HISPANIC OR LATINO                          15 (11.2%)    18 (13.4%)      15 (11.4%)      48 (12.0%) 
#>     NOT HISPANIC OR LATINO                      104 (77.6%)   103 (76.9%)    101 (76.5%)     308 (77.0%) 
#>     UNKNOWN                                      9 (6.7%)      3 (2.2%)        5 (3.8%)       17 (4.2%)  
#>   Race                                                                                                   
#>     n                                               134           134            132             400     
#>     ASIAN                                       68 (50.7%)    67 (50.0%)      73 (55.3%)     208 (52.0%) 
#>     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.0%)      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%)