FDA Figure 3
Figure 3. Time to Adverse Event Leading to Treatment Discontinuation, Safety Population, Trial X
make_fig_03()
Required variables:
-
df
: The variables specified byarm_var
,id_var
,saffl_var
,trtsdtm_var
,trtedtm_var
anddcsreas_var
.
Argument | Description | Default |
---|---|---|
df |
(data.frame ) Dataset (typically ADSL) required to build figure. |
No default |
arm_var |
(character ) Arm variable used to split table into columns. |
"ARM" |
saffl_var |
(character ) Flag variable used to indicate inclusion in safety population. |
"SAFFL" |
id_var |
(character ) Identifier variable used to count the participants within each flag. |
"USUBJID" |
trtsdtm_var |
(character ) Treatment start datetime variable in df. |
"TRTSDTM" |
trtedtm_var |
(character ) Treatment end datetime variable in df. |
"TRTEDTM" |
u_trtdur |
(character ) Unit for duration of treatment. Options are "days" , "weeks" , "months" and "years" . |
"days" |
dcsreas_var |
(character ) Reason for treatment discontinuation variable used to split figure into lines. |
"DCSREAS" |
x_lab |
(character ) x-axis label. |
paste0("Time from first dose (", u_trtdur, ")") |
y_lab |
(character ) y-axis label. |
"Percent of Patients (%)" |
xticks |
(vector of numeric ) x-axis tick positions. If NA (default), tick mark positions are automatically calculated. |
NA |
add_table |
(flag ) whether “Number of Patients” table should be printed under the plot. |
TRUE |
annotations |
(named list of character ) List of annotations to add to the figure. Valid annotation types are title , subtitles , and caption . Each name-value pair should use the annotation type as name and the desired string as value. |
NULL |
Source code for this function is available here.