format_ae_summary: Format AE summary analysis

format_ae_summaryR Documentation

Format AE summary analysis

Description

Format AE summary analysis

Usage

format_ae_summary(
  outdata,
  display = c("n", "prop", "total"),
  hide_soc_stats = FALSE,
  digits_prop = 1,
  digits_ci = 1,
  digits_p = 3,
  digits_dur = c(1, 1),
  digits_events = c(1, 1),
  filter_method = c("percent", "count"),
  filter_criteria = 0,
  sort_order = c("alphabetical", "count_des", "count_asc"),
  sort_column = NULL,
  mock = FALSE
)

Arguments

outdata

An outdata object created by prepare_ae_specific().

display

A character vector of measurement to be displayed:

  • n: Number of subjects with adverse event.

  • prop: Proportion of subjects with adverse event.

  • total: Total columns.

  • diff: Risk difference.

  • diff_ci: 95% confidence interval of risk difference using M&N method.

  • diff_p: p-value of risk difference using M&N method.

  • dur: Average of adverse event duration.

  • events_avg: Average number of adverse event per subject.

  • events_count: Count number of adverse event per subject.

hide_soc_stats

A boolean value to hide stats for SOC rows.

digits_prop

A numeric value of number of digits for proportion value.

digits_ci

A numeric value of number of digits for confidence interval.

digits_p

A numeric value of number of digits for p-value.

digits_dur

A numeric value of number of digits for average duration of adverse event.

digits_events

A numeric value of number of digits for average of number of adverse events per subject.

filter_method

A character value to specify how to filter rows:

  • count: Filtered based on participant count.

  • percent: Filtered based percent incidence.

filter_criteria

A numeric value to display rows where at least one therapy group has a percent incidence or participant count greater than or equal to the specified value. If filter_method is percent, the value should be between 0 and 100. If filter_method is count, the value should be greater than 0.

sort_order

A character value to specify sorting order:

  • alphabetical: Sort by alphabetical order.

  • count_des: Sort by count in descending order.

  • count_asc: Sort by count in ascending order.

sort_column

A character value of group in outdata used to sort a table with.

mock

A boolean value to display mock table.

Value

A list of analysis raw datasets.

Examples

meta <- meta_ae_example()
outdata <- prepare_ae_summary(meta,
  population = "apat",
  observation = "wk12",
  parameter = "any;rel;ser"
)
tbl <- outdata |>
  format_ae_summary()
head(tbl$tbl)

Merck/metalite.ae documentation built on Feb. 10, 2025, 5:03 p.m.