Cardinal
  • Home
  • Template Catalog
  • About
  • Resources
  • Help
    • Getting Started
    • Report a Bug
    • FAQ

Subjects Meeting Specific Postbaseline Hypotension Levels, Safety Population, Pooled Analysis (or Trial X)

FDA Table 38

table
FDA
safety
vital signs

FDA IG Shell

FDA IG example table shell

Programming Notes

Background and Instructions

N/A (per FDA IG)

Customization

Clinical review team may customize the cutoff criteria they wish to use.

Output

  • Full Code
  • Table
  • ARD
Code
# FDA TABLE 38 ---------------------------------------------------------------
# Self-contained template. Run top-to-bottom to build the objects below.
# Used by tests via run_template() and published in the catalog.

library(dplyr)
library(cards)
library(gtsummary)

adsl <- pharmaverseadam::adsl
advs <- pharmaverseadam::advs

# Pre-processing --------------------------------------------
adsl <- adsl |>
  filter(SAFFL == "Y") # safety population

data <- advs |>
  filter(
    # safety population
    SAFFL == "Y",
    # diastolic & systolic blood pressure
    PARAMCD %in% c("DIABP", "SYSBP"),
    # post-baseline visits
    AVISITN >= 2
  ) |>
  # analyze minimum values per parameter of each subject
  slice_min(AVAL, n = 1L, by = c(USUBJID, PARAMCD)) |>
  # define analysis value cutoffs per parameter
  mutate(
    SBP90 = PARAMCD == "SYSBP" & AVAL < 90,
    DBP60 = PARAMCD == "DIABP" & AVAL < 60
  )

ard <- bind_ard(
  ard_tabulate_value(
    data,
    variables = c(SBP90, DBP60),
    by = TRT01A,
    statistic = ~ c("n", "p"),
    # denominator values are number of subjects in arm with BP data
    denominator = data |> distinct(USUBJID, TRT01A)
  ),
  # ARD for header N values
  ard_tabulate(adsl, variables = TRT01A)
)

tbl <- tbl_ard_summary(
  ard,
  by = TRT01A,
  # Add labels for each range
  label = list(
    SBP90 = "SBP<90",
    DBP60 = "DBP<60"
  )
) |>
  modify_header(
    # Update label, add analysis value units
    label ~ paste0("**Blood Pressure (", data$VSORRESU[1], ")**"),
    # Add N values to `by` variable labels
    all_stat_cols() ~ "**{level}**  \nN = {n}"
  )


ard <- gtsummary::gather_ard(tbl)
Code
tbl
Blood Pressure (mmHg) Placebo
N = 861
Xanomeline High Dose
N = 721
Xanomeline Low Dose
N = 961
SBP<90 8 (9.5%) 0 (0.0%) 1 (1.1%)
DBP<60 32 (38.1%) 27 (37.5%) 29 (30.9%)
1 n (%)
Code
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
$tbl_ard_summary
# An ARD data frame: 25 × 12
   group1 group1_level         variable variable_level       context        stat_name stat_label     stat      fmt_fun warning error  gts_column
   <chr>  <list>               <chr>    <list>               <chr>          <chr>     <chr>          <list>    <list>  <list>  <list> <chr>     
 1 TRT01A Placebo              SBP90    TRUE                 tabulate_value n         n              8         0       <NULL>  <NULL> stat_1    
 2 TRT01A Placebo              SBP90    TRUE                 tabulate_value p         %              0.0952381 <fn>    <NULL>  <NULL> stat_1    
 3 TRT01A Placebo              DBP60    TRUE                 tabulate_value n         n              32        0       <NULL>  <NULL> stat_1    
 4 TRT01A Placebo              DBP60    TRUE                 tabulate_value p         %              0.3809524 <fn>    <NULL>  <NULL> stat_1    
 5 TRT01A Xanomeline High Dose SBP90    TRUE                 tabulate_value n         n              0         0       <NULL>  <NULL> stat_2    
 6 TRT01A Xanomeline High Dose SBP90    TRUE                 tabulate_value p         %              0         <fn>    <NULL>  <NULL> stat_2    
 7 TRT01A Xanomeline High Dose DBP60    TRUE                 tabulate_value n         n              27        0       <NULL>  <NULL> stat_2    
 8 TRT01A Xanomeline High Dose DBP60    TRUE                 tabulate_value p         %              0.375     <fn>    <NULL>  <NULL> stat_2    
 9 TRT01A Xanomeline Low Dose  SBP90    TRUE                 tabulate_value n         n              1         0       <NULL>  <NULL> stat_3    
10 TRT01A Xanomeline Low Dose  SBP90    TRUE                 tabulate_value p         %              0.0106383 <fn>    <NULL>  <NULL> stat_3    
11 TRT01A Xanomeline Low Dose  DBP60    TRUE                 tabulate_value n         n              29        0       <NULL>  <NULL> stat_3    
12 TRT01A Xanomeline Low Dose  DBP60    TRUE                 tabulate_value p         %              0.3085106 <fn>    <NULL>  <NULL> stat_3    
13 <NA>   <NULL>               TRT01A   Placebo              tabulate       n         n              86        0       <NULL>  <NULL> <NA>      
14 <NA>   <NULL>               TRT01A   Placebo              tabulate       N         N              254       0       <NULL>  <NULL> <NA>      
15 <NA>   <NULL>               TRT01A   Placebo              tabulate       p         %              0.3385827 <fn>    <NULL>  <NULL> <NA>      
16 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate       n         n              72        0       <NULL>  <NULL> <NA>      
17 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate       N         N              254       0       <NULL>  <NULL> <NA>      
18 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate       p         %              0.2834646 <fn>    <NULL>  <NULL> <NA>      
19 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate       n         n              96        0       <NULL>  <NULL> <NA>      
20 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate       N         N              254       0       <NULL>  <NULL> <NA>      
21 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate       p         %              0.3779528 <fn>    <NULL>  <NULL> <NA>      
22 <NA>   <NULL>               SBP90    <NULL>               attributes     label     Variable Label SBP<90    <fn>    <NULL>  <NULL> <NA>      
23 <NA>   <NULL>               SBP90    <NULL>               attributes     class     Variable Class logical   <NULL>  <NULL>  <NULL> <NA>      
24 <NA>   <NULL>               DBP60    <NULL>               attributes     label     Variable Label DBP<60    <fn>    <NULL>  <NULL> <NA>      
25 <NA>   <NULL>               DBP60    <NULL>               attributes     class     Variable Class logical   <NULL>  <NULL>  <NULL> <NA>      
Source Code
---
title: Subjects Meeting Specific Postbaseline Hypotension Levels, Safety Population, Pooled Analysis (or Trial X)
subtitle: FDA Table 38
categories: [table, FDA, safety, vital signs]
---

::::: columns

:::: {.column width="52%"}
### FDA IG Shell

![](ig_shell.png){fig-alt="FDA IG example table shell" .lightbox width=100%}

### Programming Notes

**Background and Instructions**

[N/A (per FDA IG)](https://www.fda.gov/media/187065/download)

**Customization**

Clinical review team may customize the cutoff criteria they wish to use.

::::

:::: {.column width="4%"}
::::

:::: {.column width="44%"}
### Output

```{r out-result, echo=FALSE, fig.align='center', out.width='100%'}
knitr::include_graphics("result.png")
```

::::

:::::

::: panel-tabset
## Full Code

```{r fullcode, file="../../../inst/templates/fda-table_38.R", message=FALSE, warning=FALSE, results='hide'}
```

## Table

```{r tbl}
tbl
```

## ARD

```{r ard, message=FALSE, warning=FALSE}
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
```

:::
 
  • This website as well as code examples are licensed under the Apache License, Version 2.0.
Cookie Preferences