screen_adr: Screening of Adverse Drug Reactions

screen_adrR Documentation

Screening of Adverse Drug Reactions

Description

[Experimental] Identify and rank the most frequently reported adverse drug reaction (ADR) terms in a dataset, based on a specified MedDRA term level. It allows users to filter terms by a frequency threshold or extract the top n most frequently occurring terms.

Arguments

.data

An adr data.table. See adr_

meddra

A meddra data.table. See meddra_

term_level

A character string specifying the MedDRA hierarchy level. Must be one of "soc", "hlgt", "hlt", "pt", or "llt".

freq_threshold

A numeric value indicating the minimum frequency (as a proportion) of cases where a term must appear to be included in the results. For example, 0.05 means 5%. Defaults to NULL, meaning no threshold is applied unless top_n is different from NULL.

top_n

An integer specifying the number of most frequently occurring terms to return. Defaults to NULL. Overrides freq_threshold if both are provided.

Details

  • If freq_threshold is set (e.g., 0.05), the function filters ADR terms appearing in at least 5% of unique reports in .data.

  • If top_n is specified, only the most frequent n terms are returned. If both freq_threshold and top_n are provided, only top_n is applied (a warning is issued in such cases).

  • Counts are computed at the case level, not the ADR level. This means frequencies reflect the proportion of unique reports (cases) where a term is mentioned, rather than the total mentions across all reports.

The function processes an ADR dataset (adr_) and a MedDRA dataset (meddra_) to generate results that are linked to a specific MedDRA hierarchy level (soc, hlgt, hlt, pt, or llt).

Value

A data.frame with the following columns:

  • term: The MedDRA term at the specified hierarchy level.

  • n: The number of unique reports (cases) where the term appears.

  • percentage: The percentage of total unique reports where the term appears.

The results are sorted in descending order of percentage.

Examples

# Example 1: Filter terms appearing in at least 5% of reports
screen_adr(
  .data = adr_,
  meddra = meddra_,
  term_level = "pt",
  freq_threshold = 0.05
)

# Example 2: Get the top 5 most frequent terms
screen_adr(
  .data = adr_,
  meddra = meddra_,
  term_level = "hlt",
  top_n = 5
)


vigicaen documentation built on April 3, 2025, 8:55 p.m.