format_ae_specific {metalite.ae}R Documentation

Format AE specific analysis

Description

Format AE specific analysis

Usage

format_ae_specific(
  outdata,
  display = c("n", "prop", "total"),
  digits_prop = 1,
  digits_ci = 1,
  digits_p = 3,
  digits_dur = c(1, 1),
  digits_events = c(1, 1),
  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: Average number of adverse event per subject.

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.

mock

A boolean value to display mock table.

Value

A list of analysis raw datasets.

Examples

meta <- meta_ae_example()

outdata <- prepare_ae_specific(meta,
  population = "apat",
  observation = "wk12",
  parameter = "rel"
)

# Basic example
tbl <- outdata |>
  format_ae_specific()
head(tbl$tbl)

# Display different measurements
tbl <- outdata |>
  extend_ae_specific_events() |>
  format_ae_specific(display = c("n", "prop", "events"))
head(tbl$tbl)

[Package metalite.ae version 0.1.2 Index]