One call for the standard "how many subjects completed / discontinued, and why" display: tern::analyze_vars() applied to the disposition status variable(s) in adsl, split by treatment.

tab_disposition(adsl, by = "TRT01P", vars = NULL, ...)

Arguments

adsl

Subject-level analysis dataset (one row per subject), already filtered to the population you want reported (e.g. the randomised or enrolled population). The column denominators are nrow(adsl) per by group.

by

Column in adsl used to split the table into columns. Default "TRT01P".

vars

Character vector of disposition variables to summarise. Default: the intersection of c("EOSSTT", "DCSREAS") with the columns present in adsl.

...

Passed on to tern::analyze_vars().

Value

An object of class c("sasparity_disposition", "sasparity_table") wrapping an rtables::TableTree.

SAS equivalent

A %disposition macro / PROC FREQ TABLES EOSSTT*TRT01P (plus DCSREAS when collected), the Table 14.1.x "Subject Disposition" display. See parity_note().

Examples

adsl <- sasparity_example("adsl")
adsl <- adsl[adsl$SAFFL == "Y", ]
tab_disposition(adsl)
#> 
#> ── Subject Disposition ──
#> 
#>  SAS equivalent: %disposition macro / PROC FREQ on EOSSTT (+ DCSREAS) by treatment group (Table 14.1.x Subject Disposition)
#>  Denominator: n per column = subjects in `adsl` (10 total)
#>                   A         B   
#>                 (N=5)     (N=5) 
#> ————————————————————————————————
#> n                 5         5   
#> COMPLETED      3 (60%)   3 (60%)
#> DISCONTINUED   2 (40%)   2 (40%)