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

Subjects With Adverse Events by Male-Specific OCMQ (Narrow) and Preferred Term, Male Safety Population, Pooled Analysis (or Trial X)

FDA Table 33

table
FDA
safety
adverse events

FDA IG Shell

FDA IG example table shell

Programming Notes

Background and Instructions

Some OCMQs are relevant to only one sex. For instance, the Erectile Dysfunction OCMQ is relevant only to males, while the Abnormal Uterine Bleeding OCMQ is relevant only to females. Therefore, the tables that present these sex-specific OCMQs provide only the results for males or females, as appropriate, and have smaller denominators than the full safety population. Table 33: Adverse Events by Male Specific FDA Medical Query is limited to male-specific OCMQs and the male population. Table 34: Adverse Events by Female Specific FDA Medical Query is limited to female-specific OCMQs and the female population.

Customization

Clinical reviewers may request a similar table of AEs by male or female specific OCMQs (broad) from the CDS.

Output

  • Full Code
  • Table
  • ARD
Code
# FDA TABLE 33 ---------------------------------------------------------------
# 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
adae <- pharmaverseadam::adae

set.seed(1)
adae <- rename(adae, OCMQ01SC = AEHLTCD, OCMQ01NAM = AEHLT)
levels(adae$OCMQ01SC) <- c("BROAD", "NARROW")
adae$OCMQ01SC[is.na(adae$OCMQ01SC)] <- "NARROW"
adae$OCMQ01NAM <- factor(adae$OCMQ01NAM, levels = c("Erectile Dysfunction", "Gynecomastia"))
adae$OCMQ01NAM[adae$SEX == "M"] <- as.factor(
  sample(
    c("Erectile Dysfunction", "Gynecomastia"),
    sum(adae$SEX == "M"),
    replace = TRUE
  )
)


# Pre-processing --------------------------------------------
data <- adae |>
  filter(
    SAFFL == "Y",
    SEX == "M",
    OCMQ01SC == "NARROW",
    # filtering here to reduce the size of the table
    AEDECOD %in% c("COUGH", "COLD SWEAT", "SOMNOLENCE", "APPLICATION SITE ERYTHEMA")
  ) |>
  select(OCMQ01SC, TRT01A, OCMQ01NAM, AEDECOD, USUBJID) |>
  # setting an explicit level for NA values so empty strata combinations are shown.
  mutate(across(everything(), ~ {
    if (anyNA(.)) {
      forcats::fct_na_value_to_level(as.factor(.), level = "<Missing>")
    } else {
      .
    }
  }))

# denominator values include only Male subjects in the arm with AEs
denom <- data |> distinct(USUBJID, TRT01A)

tbl <- data |>
  tbl_hierarchical(
    by = TRT01A,
    variables = c(OCMQ01NAM, AEDECOD),
    id = USUBJID,
    denominator = denom,
    # variables to calculate rates for
    include = c(AEDECOD),
    label = list(
      OCMQ01NAM ~ "OCMQ (Narrow)",
      AEDECOD ~ "Preferred Term"
    )
  )


ard <- gtsummary::gather_ard(tbl)
Code
tbl
OCMQ (Narrow)
    Preferred Term
Placebo
N = 61
Xanomeline High Dose
N = 121
Xanomeline Low Dose
N = 111
Erectile Dysfunction


    APPLICATION SITE ERYTHEMA 0 (0%) 6 (50%) 8 (73%)
    COLD SWEAT 1 (17%) 0 (0%) 0 (0%)
    COUGH 2 (33%) 3 (25%) 2 (18%)
    SOMNOLENCE 2 (33%) 0 (0%) 2 (18%)
Gynecomastia


    APPLICATION SITE ERYTHEMA 1 (17%) 6 (50%) 4 (36%)
    COLD SWEAT 1 (17%) 0 (0%) 0 (0%)
    COUGH 1 (17%) 2 (17%) 1 (9.1%)
    SOMNOLENCE 0 (0%) 1 (8.3%) 2 (18%)
1 n (%)
Code
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
$tbl_hierarchical
# An ARD data frame: 81 × 15
   group1 group1_level         group2    group2_level         variable variable_level            context      stat_name stat_label    stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>     <list>               <chr>    <list>                    <chr>        <chr>     <chr>       <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Placebo                   tabulate     n         n           6      6        0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Placebo                   tabulate     N         N          29      29       0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Placebo                   tabulate     p         %           0.207  20.7     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline High Dose      tabulate     n         n          12      12       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline High Dose      tabulate     N         N          29      29       0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline High Dose      tabulate     p         %           0.414  41.4     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline Low Dose       tabulate     n         n          11      11       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline Low Dose       tabulate     N         N          29      29       0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               <NA>      <NULL>               TRT01A   Xanomeline Low Dose       tabulate     p         %           0.379  37.9     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           6      6        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0.5    50       <fn>    <NULL>  <NULL> stat_2    
16 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           8      8        <fn>    <NULL>  <NULL> stat_3    
17 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
18 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0.727  73       <fn>    <NULL>  <NULL> stat_3    
19 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_1    
20 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
21 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical p         %           0.167  17       <fn>    <NULL>  <NULL> stat_1    
22 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_2    
23 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
24 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_2    
25 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_3    
26 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
27 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COLD SWEAT                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_3    
28 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_1    
29 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
30 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical p         %           0.333  33       <fn>    <NULL>  <NULL> stat_1    
31 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical n         n           3      3        <fn>    <NULL>  <NULL> stat_2    
32 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
33 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical p         %           0.25   25       <fn>    <NULL>  <NULL> stat_2    
34 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_3    
35 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
36 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  COUGH                     hierarchical p         %           0.182  18       <fn>    <NULL>  <NULL> stat_3    
37 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_1    
38 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
39 TRT01A Placebo              OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical p         %           0.333  33       <fn>    <NULL>  <NULL> stat_1    
40 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_2    
41 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
42 TRT01A Xanomeline High Dose OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_2    
43 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_3    
44 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
45 TRT01A Xanomeline Low Dose  OCMQ01NAM Erectile Dysfunction AEDECOD  SOMNOLENCE                hierarchical p         %           0.182  18       <fn>    <NULL>  <NULL> stat_3    
46 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_1    
47 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
48 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0.167  17       <fn>    <NULL>  <NULL> stat_1    
49 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           6      6        <fn>    <NULL>  <NULL> stat_2    
50 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
51 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0.5    50       <fn>    <NULL>  <NULL> stat_2    
52 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical n         n           4      4        <fn>    <NULL>  <NULL> stat_3    
53 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
54 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  APPLICATION SITE ERYTHEMA hierarchical p         %           0.364  36       <fn>    <NULL>  <NULL> stat_3    
55 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_1    
56 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
57 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical p         %           0.167  17       <fn>    <NULL>  <NULL> stat_1    
58 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_2    
59 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
60 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_2    
61 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_3    
62 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
63 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COLD SWEAT                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_3    
64 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_1    
65 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
66 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical p         %           0.167  17       <fn>    <NULL>  <NULL> stat_1    
67 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_2    
68 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
69 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical p         %           0.167  17       <fn>    <NULL>  <NULL> stat_2    
70 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_3    
71 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
72 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  COUGH                     hierarchical p         %           0.0909 9.1      <fn>    <NULL>  <NULL> stat_3    
73 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical n         n           0      0        <fn>    <NULL>  <NULL> stat_1    
74 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical N         N           6      6        <fn>    <NULL>  <NULL> stat_1    
75 TRT01A Placebo              OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical p         %           0      0        <fn>    <NULL>  <NULL> stat_1    
76 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical n         n           1      1        <fn>    <NULL>  <NULL> stat_2    
77 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical N         N          12      12       <fn>    <NULL>  <NULL> stat_2    
78 TRT01A Xanomeline High Dose OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical p         %           0.0833 8.3      <fn>    <NULL>  <NULL> stat_2    
79 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical n         n           2      2        <fn>    <NULL>  <NULL> stat_3    
80 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical N         N          11      11       <fn>    <NULL>  <NULL> stat_3    
81 TRT01A Xanomeline Low Dose  OCMQ01NAM Gynecomastia         AEDECOD  SOMNOLENCE                hierarchical p         %           0.182  18       <fn>    <NULL>  <NULL> stat_3    
Source Code
---
title: Subjects With Adverse Events by Male-Specific OCMQ (Narrow) and Preferred Term, Male Safety Population, Pooled Analysis (or Trial X)
subtitle: FDA Table 33
categories: [table, FDA, safety, adverse events]
---

::::: 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**

Some OCMQs are relevant to only one sex. For instance, the Erectile Dysfunction OCMQ is relevant only to males, while the Abnormal Uterine Bleeding OCMQ is relevant only to females. Therefore, the tables that present these sex-specific OCMQs provide only the results for males or females, as appropriate, and have smaller denominators than the full safety population. Table 33: Adverse Events by Male Specific FDA Medical Query is limited to male-specific OCMQs and the male population. Table 34: Adverse Events by Female Specific FDA Medical Query is limited to female-specific OCMQs and the female population.

**Customization**

Clinical reviewers may request a similar table of AEs by male or female specific OCMQs (broad) from the CDS.

::::

:::: {.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_33.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