Skip to contents

ADAE Summary with Risk Statistics

Usage

adae_risk_summary(
  datain,
  a_subset = NA_character_,
  summary_by = "Patients",
  hterm = "AEBODSYS",
  lterm = "AEDECOD",
  ctrlgrp,
  trtgrp,
  statistics = "Risk Ratio",
  riskdiff_pct = "N",
  alpha = 0.05,
  cutoff_where = NA,
  sort_opt = "Ascending",
  sort_var = "Count",
  sum_row = "N",
  sum_row_label = "Participants with Any AE",
  risklabels = tbl_risk_labels(statistics),
  sigdec_cat = 1,
  pctsyn = "Y"
)

Arguments

datain

Input data from mentry() output to get counts for each category

a_subset

Analysis Subset condition specific to categorical analysis.

summary_by

Measure to construct the summary by. Values: 'Patients' or 'Events'.

hterm

High Level Adverse Event term variable, used for analysis

lterm

Low Level Adverse Event term variable, used for analysis

ctrlgrp

Treatment Control value.

trtgrp

Treatment(s) to create pairs. Only 1 value for Volcano/table, can be multiple for forest_plot().

statistics

Statistic to be calculated. Values: 'Risk Ratio' or 'Risk Difference'.

riskdiff_pct

To display risk and CI as % if statistic = risk difference (Y/N)

alpha

Alpha value to determine confidence interval for risk calculation. Default: 0.05

cutoff_where

Filter condition for incidence/pct. Consider only terms with eg: "FREQ > 5" or "PCT <3". Must contain FREQ or PCT (count or percent)

sort_opt

How to sort terms, only for table/forest plot. Values: 'Ascending','Descending','Alphabetical'.

sort_var

Metric to sort by. Values: 'Count','Percent','RiskValue'.

sum_row

To show summary/any term row or not. 'Y'/'N'

sum_row_label

Label for Summary Row to be displayed, if Y.

risklabels

List containing labels for table with elements: risk, riskci, p, low, up, lowup

sigdec_cat

Number of decimal places for % displayed in output

pctsyn

Display Percentage Sign in table or not. Values: "Y"/"N"

Value

Data frame to be displayed with risk/counts of higher and lower AE terms

Examples

data(adae)

ae_pre_process <- ae_pre_processor(
  datain = adae,
  ae_filter = "Any Event",
  obs_residual = 0,
  fmq_data = FMQ_Consolidated_List
)
ae_entry <- ae_pre_process[["data"]] |>
  mentry(
    subset = NA,
    byvar = "AEBODSYS",
    trtvar = "TRTA",
    trtsort = "TRTAN",
    trttotalyn = "N",
    add_grpmiss = "N",
    sgtotalyn = "N",
    pop_fil = "Overall Population"
  )

ae_risk <- ae_entry |>
  adae_risk_summary(
    a_subset = ae_pre_process[["a_subset"]],
    summary_by = "Patients",
    hterm = "AEBODSYS",
    lterm = "AEDECOD",
    ctrlgrp = "Placebo",
    trtgrp = "Xanomeline Low Dose",
    statistics = "Risk Ratio",
    alpha = 0.05,
    cutoff_where = "PCT > 5",
    sort_opt = "Ascending",
    sort_var = "Count"
  )
#> mcatstat success
#> mcatstat success

ae_risk |>
  tbl_processor(keepvars = c("Risk Ratio (CI)", "P-value")) |>
  tbl_display()
#> Registered S3 method overwritten by 'ftExtra':
#>   method                  from     
#>   as_flextable.data.frame flextable

Placebo

Xanomeline Low Dose

Risk Ratio (CI)

P-value

n (%)

n (%)

CARDIAC DISORDERS

1 ( 1.6%)

4 ( 5.5%)

3.397 (0.39, 29.61)

0.4665

   SINUS BRADYCARDIA

1 ( 1.6%)

4 ( 5.5%)

3.397 (0.39, 29.61)

0.4665

RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS

1 ( 1.6%)

5 ( 6.8%)

4.247 (0.51, 35.39)

0.2927

   COUGH

1 ( 1.6%)

5 ( 6.8%)

4.247 (0.51, 35.39)

0.2927

NERVOUS SYSTEM DISORDERS

2 ( 3.2%)

6 ( 8.2%)

2.548 (0.53, 12.17)

0.3905

   DIZZINESS

2 ( 3.2%)

6 ( 8.2%)

2.548 (0.53, 12.17)

0.3905

INFECTIONS AND INFESTATIONS

8 (12.9%)

5 ( 6.8%)

0.531 (0.18, 1.54)

0.3705

   NASOPHARYNGITIS

2 ( 3.2%)

4 ( 5.5%)

1.699 (0.32, 8.96)

0.8304

   UPPER RESPIRATORY TRACT INFECTION

6 ( 9.7%)

1 ( 1.4%)

0.142 (0.02, 1.14)

0.0751

GASTROINTESTINAL DISORDERS

9 (14.5%)

3 ( 4.1%)

0.283 (0.08, 1)

0.0697

   DIARRHOEA

9 (14.5%)

3 ( 4.1%)

0.283 (0.08, 1)

0.0697

GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS

16 (25.8%)

38 (52.1%)

2.017 (1.25, 3.25)

0.0034

   APPLICATION SITE VESICLES

1 ( 1.6%)

4 ( 5.5%)

3.397 (0.39, 29.61)

0.4665

   FATIGUE

1 ( 1.6%)

5 ( 6.8%)

4.247 (0.51, 35.39)

0.2927

   APPLICATION SITE ERYTHEMA

3 ( 4.8%)

12 (16.4%)

3.397 (1, 11.5)

0.0626

   APPLICATION SITE IRRITATION

3 ( 4.8%)

8 (11.0%)

2.265 (0.63, 8.17)

0.3272

   APPLICATION SITE DERMATITIS

5 ( 8.1%)

9 (12.3%)

1.529 (0.54, 4.32)

0.5985

   APPLICATION SITE PRURITUS

6 ( 9.7%)

22 (30.1%)

3.114 (1.35, 7.19)

0.0068

SKIN AND SUBCUTANEOUS TISSUE DISORDERS

16 (25.8%)

33 (45.2%)

1.752 (1.07, 2.86)

0.0311

   SKIN IRRITATION

2 ( 3.2%)

6 ( 8.2%)

2.548 (0.53, 12.17)

0.3905

   RASH

5 ( 8.1%)

13 (17.8%)

2.208 (0.83, 5.85)

0.1598

   ERYTHEMA

7 (11.3%)

14 (19.2%)

1.699 (0.73, 3.94)

0.3068

   PRURITUS

8 (12.9%)

20 (27.4%)

2.123 (1.01, 4.48)

0.0633